lrf402788946 4 years ago
parent
commit
0659497b0b
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/controller/weixin.js
  2. 1 0
      app/router.js

+ 1 - 1
app/controller/weixin.js

@@ -14,7 +14,7 @@ class WeixinController extends Controller {
     await this.service.authBack(this.ctx.query);
   }
   async wxUser() {
-    const data = await this.service.wxUser(this.ctx.query);
+    const data = await this.service.wxUser(this.ctx.params, this.ctx.query);
     this.ctx.ok({ data });
   }
   async jsapiAuth() {

+ 1 - 0
app/router.js

@@ -10,6 +10,7 @@ module.exports = app => {
   const vision = 'v0';
   router.get(`${profix}${vision}/wxlogin/:site`, controller.weixin.auth);
   router.get(`${profix}${vision}/authBack`, controller.weixin.authBack);
+  router.get(`${profix}${vision}/wxuser/:site`, controller.weixin.wxUser);
   router.post(`${profix}${vision}/util`, controller.home.utilMethod);
   router.post(`${profix}${vision}/spm`, controller.home.spm);
   router.get(`${profix}${vision}/index`, controller.home.indexQuery);