#Wechat-Mocker
Wechat-Mocker是一个微信本地测试平台,用于在本地脱离微信测试平台和微信进行测试。
- 默认监听18181端口,把server向微信收发消息的地址改为 http://localhost:18181/
- 若有proxy请清除
- 根据自己的情况修改 /backend/config.json
- 运行自己的server和Wechat-Mocker
- 打开 http://localhost:18181/sandbox/sandbox.html 进行接入,如要创建自定义菜单,建议此时同时操作
- 打开 http://localhost:18181/sandbox/index.html,操作与微信类似
Feature request, pull request and bug report are welcomed.
If Wechat-Mocker helps you, pls star me at https://github.com/hermione521/wechat-mocker!
如果 Wechat-Mocker 对你有所帮助,请加星!
url:
http://localhost:18181/weixin/access
method:
POST
body:
url: "http://localhost:18080/weixin"
token: "anywhere"
url:
http://localhost:18181/weixin/token
method:
GET
qs:
grant_type: "client_credential"
appid: config.appid
secret: config.secret
url:
http://localhost:18181/weixin/menu/create
method:
POST
qs:
access_token: go.access_token
body:
menu(json)
url:
http://localhost:18181/weixin/menu/get
method:
GET
qs:
access_token: go.access_token
url:
http://localhost:18181/user/menuClick
method:
GET
qs:
eventKey: eventKey
url:
http://localhost:18181/user/text
method:
GET
qs:
content: content