-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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。 |
443a6a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
您好,麻烦问一下,配置文件里面转发用户列表的参数如何写呢?这个参数数不知道在哪找,我有点菜。感谢。
443a6a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以登录微信公众平台,查看关注的用户的openid。