lrf402788946 4 rokov pred
rodič
commit
458c99da57
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/service/weixin.js

+ 1 - 1
app/service/weixin.js

@@ -77,7 +77,7 @@ class WeixinAuthService extends AxiosService {
     const { appid } = this.wxInfo;
     const res = await this.httpGet('/api.weixin.qq.com/cgi-bin/user/info?lang=zh_CN', { appid, openid });
     const object = _.pick(res, [ 'nickname', 'headimgurl', 'openid' ]); // 昵称,头像,openid
-    return object;
+    return { name: object.nickname, icon: object.headimgurl, openid };
   }
   /**
    * JsApi验证