当前位置: 首页 > news >正文

石家庄市建设局网站信息公开适合学生做的网站类型

石家庄市建设局网站信息公开,适合学生做的网站类型,常熟沿江开发区人才网最新招聘,网络规划设计师和hcie目标是开发一个简易机器人#xff0c;能接收消息并作出回复。 获取企业 ID 企业信息页面链接地址#xff1a;https://work.weixin.qq.com/wework_admin/frame#profile 自建企业微信机器人 配置机器人应用详情 功能配置 接收消息服务器配置 配置消息服务器配置 配置环境变量…目标是开发一个简易机器人能接收消息并作出回复。 获取企业 ID 企业信息页面链接地址https://work.weixin.qq.com/wework_admin/frame#profile 自建企业微信机器人 配置机器人应用详情 功能配置 接收消息服务器配置 配置消息服务器配置 配置环境变量 获取 agentId 和 Secret 信息 创建 .env 配置文件配置企业微信机器人应用的配置信息 corpId corpSecret agentId发送应用消息配置 配置应用消息https://developer.work.weixin.qq.com/document/path/90236 请求方式POSTHTTPS请求地址https://qyapi.weixin.qq.com/cgi-bin/message/send?access_tokenACCESS_TOKEN 机器人应用支持推送文本、图片、视频、文件、图文等类型。 配置 POST 请求参数 config.js 配置 const request require(request) const { config } require(dotenv) config()const corpId process.env.corpId const corpSecret process.env.corpSecret const agentId parseInt(process.env.agentId) const toUser allconst tokenUrl https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid${corpId}corpsecret${corpSecret} const sendMsgUrl https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token;function getToken(success, error) {request(tokenUrl, function(error, response, body) {if (!error response.statusCode 200) {var json JSON.parse(body);console.log(json)success(json.access_token)} else {error(Token in error.)}}) }function sendMessage(token, content) {const requestData {touser: toUser,msgtype: text,agentid: agentId,safe: 0,text: {content: content}}request({url: ${sendMsgUrl}${token},method: POST,json: true,headers: {content-type: application/json,},body: requestData}, function(error, response, body) {console.log(body)if (!error response.statusCode 200) {}}); }function sendText(content) {getToken((token) {sendMessage(token, content)}, (error) {console.log(error)}) }module.exports {sendText, }定时发送任务 npm 下载 node-schedule 定时任务模块 npm install node-schedule配置定时发送任务 const alarmWechat require(./config.js) const schedule require(node-schedule)const scheduleTask () {schedule.scheduleJob(30 * * * * *,() {console.log(scheduleCronstyle: new Date());alarmWechat.sendText(testmessage)}); }scheduleTask();开发者调试工具
http://www.pierceye.com/news/387021/

相关文章:

  • 用dreammwea怎么做视频网站域名注册网站建设
  • 网站关键词用热门的还是冷门注销网站备案时间
  • 苏晋建设集团网站书店网站建设目标调研的方案
  • 下沙建设局网站建设公司内网网站的意义
  • 全屏响应式网站模板污网站公司网站
  • 抚远佳木斯网站建设领动建站
  • 班级网站 建设模板做任务佣金网站源码
  • 网站的关键词库广州建网站培训
  • 好的网页设计网站网站排名提升工具
  • 个人网站需要那些企查查入口网页版
  • 怎么用自己主机做网站、淮南网站推广
  • 丰台网站制作网站域名.xin
  • 省建设厅网站6工作室网页模板
  • 怎么制作免费网站教程视频wordpress 准迁
  • html5新增标签seo网址超级外链工具
  • 自己做的网站访问不了建站如何挣钱
  • 网盘做网站做网站推广员工
  • 河北正规网站建设比较网页制作平台哪家好
  • 2017网站seo如何做wordpress设置登录背景
  • 网站的模块怎么做网站建设的技术支持包括
  • 青岛网站设计哪家好游戏小程序开发定制
  • 建设网站西丽提升网站建设品质
  • 大良营销网站建设方案广东东莞划定多个高风险区
  • 毕业设计做网站用什么品牌网站建设新闻
  • c 网站开发用的人多吗做it行业招标网站有哪些
  • 招聘做牙技工的网站用html框架做网站
  • 本地wordpress站点上传央企网站群建设
  • 广州免费自助建站开发wordpress公园
  • 淘宝客建网站简单网站建设优化推广
  • 长沙做网站找哪家好毕业设计开题报告网站开发