egg-wechat-all
Install
$ npm i egg-wechat-all --save
Usage
// {app_root}/config/plugin.jsexportswechatAll = enable: true package: 'egg-wechat-all';
egg-redis is required.
Configuration
// {app_root}/config/config.default.jsexportswechatAll = appid: '' appsecret: '' token: '' encodingAESKey: '' payment: partnerKey: '' mchId: '' notifyUrl: '' pfx: '' modules: message: true // enable or disable co-wechat api: true // enable or disable co-wechat-api oauth: true // enable or disable co-wechat-oauth payment: true // enable or disable co-wechat-payment ;
see config/config.default.js for more details.
How
appwechatmessageMiddleware //co-wechat middlewareappwechatapi // co-wechat-apiappwechatoauth // co-wechat-oauthappwechatpayment // co-wechat-payment
For more details, please refer to the following links.
Example
'use strict';const Controller = Controller; module { async { const token = await appwechatoauth; thisctxbody = JSON; } WechatControllerprototypeindex = appwechat; return WechatController;};
Questions & Suggestions
Please open an issue here.