1.1.0 • Published 2 years ago

wecom-utils-mt v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

企业微信工具

功能:

  1. token 自动续期
  2. 发送消息:sendMsg
  3. 获取用户信息:getUserInfoByCode getUserInfoById
  4. 企业微信发送消息验证:validation
  5. 消息解码:decode
  6. 撤回消息: recallMsg

使用说明:

  1. main.ts 引入 setOption() 并设置参数,其中 msg 相关参数若不设置则无法使用功能 4 和 5
  2. 在需要用到的地方引入使用即可

初始化示例:

import { setOption } from 'wecom-utils-mt';
setOption({
  corpId: 'your corpId',
  agentId: 'your agentId',
  corpSecret: 'your corpSecret',
  msgKey: 'your msgKey',
  msgToken: 'your msgToken',
});

使用示例:

import { sendMsg } from 'wecom-utils-mt';
sendMsg({
  touser: 'userId',
  msgtype: 'text',
  text: {
    content: '您收到一条新消息,请尽快处理'
  },
})
1.1.0

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago