wechat

TIP

微信模块

sendWorkAppFile (appCode, userList, localFileCode, filename)

推送文件到企业微信应用

参数类型作用备注
appCodestring微信编码
userListarray用户编码列表多个用户用'|'分开
localFileCodestring本地目录数据端点编码
filenamestring推送文件名称

例 :

 await api.wechat.sendWorkAppFile('123abc','zhangsan|lisi',  '123abc', '推送EXCEL.xlex')

sendWorkAppText (appCode, userList, text)

推送文本到企业微信应用

参数类型作用备注
appCodestring企业微信应用数据端点编码
userListstring用户编码多个用户用'|'分开
textstring推送文本

例 :

await api.wechat.sendWorkAppText('123abc','zhangsan','hello world')

sendWorkAppNews (appCode, userList, title, description, url, picUrl)

推送图文到企业微信应用

参数类型作用备注
appCodestring企业微信应用数据端点编码
userListstring用户编码多个用户用'|'分开
textstring标题
descriptionstring描述
urlstring外链
picUrlstring图片外链

例 :

await api.wechat.sendWorkAppNews(
       'sFDrhbBYFhtJXEWQ',
       '123',
       '标题',
       '描述',
       'https://www.baidu.com/',
       'https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF')

sendWorkAppMPNews (appCode, userList, author, title, content, url, localFileCode, filename)

推送微信图文到企业微信应用

参数类型作用备注
appCodestring企业微信应用数据端点编码
userListstring用户编码多个用户用'|'分开
authorstring作者
titlestring标题
contentstring内容
urlstring外链
localFileCodestring本地文件目录端点编码
filenamestring文件名

例 :

await api.wechat.sendWorkAppMPNews(
       'sFDrhbBYFhtJXEWQ',
       `123`,
       `作者`,
       `标题`,
       `内容`,
       `https://www.baidu.com/`,
       'TmCZFNyDQSHDWGRR',
       `11.xlsx`)