liuyu 4 năm trước cách đây
mục cha
commit
8ac20789cf
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      app/controller/weixin.js

+ 3 - 0
app/controller/weixin.js

@@ -145,11 +145,14 @@ class WeixinController extends Controller {
     if (openid) {
       console.log('redirect_uri-->' + redirect_uri);
       const user = await this.ctx.service.user.findByOpenid(openid);
+      console.log('用户信息1--->' + user);
       if (type === '0') {
         // 通过openid取得用户信息
         if (user) {
           const user_ = JSON.parse(JSON.stringify(user));
+          console.log('用户信息2--->' + user_);
           user_ = checkVip(user_);
+          console.log('用户信息remark--->' + user_);
           const token = await this.ctx.service.login.createJwt(user_);
           const to_uri = urljoin(redirect_uri, `?token=${token}`);
           // TODO: 重定性页面