Closed dcboy closed 7 years ago
@dcboy
我把源码稍微改动了一下,我是这么处理的。 const body = await handle(formatted, ctx); 前面接收 async(message, ctx) => { return '测试消息'; }
router.all([path], async(ctx, next) => { return wechat('xxxx').middleware(controller[v].bind(null, ctx))(ctx, next); });
这样也可以,不改代码了
我加上 ctx 作为第二个参数吧。
发布了 2.2.0
这里handle 需要获取ctx