shenjj пре 7 година
родитељ
комит
21069a9efa
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      store/index.js

+ 5 - 1
store/index.js

@@ -533,8 +533,12 @@ export const actions = {
         localStorage.removeItem('USOFTMALLWECHATINFO')
         if (response.data.status >= 0) {
           // 有状态
-          if (id !== '' && id && id !== undefined) {
+          if (id !== '' && id && id !== undefined) { // 传了openid
             Userinfo.openid = id
+          } else { // 没有openid
+            Userinfo.headimgurl = response.data.headimgurl
+            Userinfo.nickname = response.data.nickname
+            Userinfo.openid = response.data.openid
           }
           Userinfo.status = response.data.status
           Userinfo.enterprises = response.data.enterprises