TIP
微信模块
sendWorkAppFile (appCode, userList, localFileCode, filename)
推送文件到企业微信应用
| 参数 | 类型 | 作用 | 备注 |
|---|---|---|---|
| appCode | string | 微信编码 | |
| userList | array | 用户编码列表 | 多个用户用'|'分开 |
| localFileCode | string | 本地目录数据端点编码 | |
| filename | string | 推送文件名称 |
例 :
await api.wechat.sendWorkAppFile('123abc','zhangsan|lisi', '123abc', '推送EXCEL.xlex')
sendWorkAppText (appCode, userList, text)
推送文本到企业微信应用
| 参数 | 类型 | 作用 | 备注 |
|---|---|---|---|
| appCode | string | 企业微信应用数据端点编码 | |
| userList | string | 用户编码 | 多个用户用'|'分开 |
| text | string | 推送文本 |
例 :
await api.wechat.sendWorkAppText('123abc','zhangsan','hello world')
sendWorkAppNews (appCode, userList, title, description, url, picUrl)
推送图文到企业微信应用
| 参数 | 类型 | 作用 | 备注 |
|---|---|---|---|
| appCode | string | 企业微信应用数据端点编码 | |
| userList | string | 用户编码 | 多个用户用'|'分开 |
| text | string | 标题 | |
| description | string | 描述 | |
| url | string | 外链 | |
| picUrl | string | 图片外链 |
例 :
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)
推送微信图文到企业微信应用
| 参数 | 类型 | 作用 | 备注 |
|---|---|---|---|
| appCode | string | 企业微信应用数据端点编码 | |
| userList | string | 用户编码 | 多个用户用'|'分开 |
| author | string | 作者 | |
| title | string | 标题 | |
| content | string | 内容 | |
| url | string | 外链 | |
| localFileCode | string | 本地文件目录端点编码 | |
| filename | string | 文件名 |
例 :
await api.wechat.sendWorkAppMPNews(
'sFDrhbBYFhtJXEWQ',
`123`,
`作者`,
`标题`,
`内容`,
`https://www.baidu.com/`,
'TmCZFNyDQSHDWGRR',
`11.xlsx`)