Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
bssthu committed Sep 16, 2016
1 parent c771691 commit 443a6a3
Showing 4 changed files with 43 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# wechat_alerter
向关注服务号的特定用户转发模板消息

## 开发环境
Node.js v4.2.2

## 使用说明
```bash
cp ./docs/config.json.default ./conf/config.json
```
并按需修改配置文件conf/config.json。

## 其他说明
* [微信测试号配置](docs/wechat_sandbox.md)

## License
LGPL-3.0
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js
21 changes: 21 additions & 0 deletions docs/config.js.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// copy to ../conf, then change the name of this file to 'config.js'
module.exports = {
'httpPort': 80,
'token': 'mytoken', // 公众号的令牌
'encodingAesKey': 'mykey', // 公众号的消息加解密密钥

// 测试号/服务号的信息
'appId': '000000000000000000',
'appsecret': '00000000000000000000000000000000',

// 模板ID
'templateId': '0000000000000000000000000000000000000000000',
// 转发的用户列表
'users': [
'0000000000000000000000000000'
],

// 消息接收相关设置
'clientPort': 12300,
'clientToken': 'myclienttoken'
};
6 changes: 6 additions & 0 deletions docs/wechat_sandbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 测试号配置流程
1. 登录微信公众平台,从开发者工具页面中申请公众平台测试帐号。
2. 记录测试号的 `appID`, `appsecret`
3. 修改接口配置信息。
4. 关注测试号,获得用户微信号(openid)。
5. 编写测试模板,本程序使用的测试模板内容应包含 `{{Message.DATA}}`,并记录模板ID。

2 comments on commit 443a6a3

@xingfeiC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好,麻烦问一下,配置文件里面转发用户列表的参数如何写呢?这个参数数不知道在哪找,我有点菜。感谢。

@bssthu
Copy link
Owner Author

@bssthu bssthu commented on 443a6a3 Mar 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以登录微信公众平台,查看关注的用户的openid。

Please sign in to comment.