0.0.1 • Published 11 years ago
wechat-mocker v0.0.1
#Wechat-Mocker
Wechat-Mocker是一个微信本地测试平台,用于在本地脱离微信测试平台和微信进行测试。
How to use
- 默认监听18181端口,把server向微信收发消息的地址改为 http://localhost:18181/
- 若有proxy请清除
- 根据自己的情况修改 /backend/config.json
- 运行自己的server和Wechat-Mocker
- 打开 http://localhost:18181/sandbox/sandbox.html 进行接入,如要创建自定义菜单,建议此时同时操作
- 打开 http://localhost:18181/sandbox/index.html,操作与微信类似
Support
Feature request, pull request and bug report are welcomed.
Server Part
基础内容
url:
http://localhost:18181/weixin/accessmethod:
POSTbody:
url: "http://localhost:18080/weixin"
token: "anywhere"url:
http://localhost:18181/weixin/tokenmethod:
GETqs:
grant_type: "client_credential"
appid: config.appid
secret: config.secret自定义菜单
url:
http://localhost:18181/weixin/menu/createmethod:
POSTqs:
access_token: go.access_tokenbody:
menu(json)url:
http://localhost:18181/weixin/menu/getmethod:
GETqs:
access_token: go.access_tokenUser Part
Click Menu
url:
http://localhost:18181/user/menuClickmethod:
GETqs:
eventKey: eventKeySend Text
url:
http://localhost:18181/user/textmethod:
GETqs:
content: content0.0.1
11 years ago