node-webot / wechat

微信公共平台消息接口服务中间件
Other
5.11k stars 1.19k forks source link

动态config #273

Closed jebberwocky closed 6 years ago

jebberwocky commented 6 years ago

请问 wechat(config, function (req, res, next) { 怎么让config变成动态的呢?, 每个request不同

jebberwocky commented 6 years ago

自问自答 inject req.wechat_token = wxconfig.token; req.cryptor = new WXBizMsgCrypt(wxconfig.token, wxconfig.encodingAESKey, wxconfig.appid);