shish 6 лет назад
Родитель
Сommit
0509908a1f
3 измененных файлов с 5 добавлено и 5 удалено
  1. 4 2
      store/src/admin/home/workbench.vue
  2. 0 2
      store/src/mixins/globalMixins.js
  3. 1 1
      store/src/utils/auth.js

+ 4 - 2
store/src/admin/home/workbench.vue

@@ -261,11 +261,13 @@ export default {
   },
   computed: {
     ...mapGetters({ userInfo: "getUser" }),
+    ...mapGetters({ loginInfo: "getLoginInfo" }),
     avatarImg() {
-      return this.$util.isEmpty(this.userInfo) ? "" : this.userInfo.logoUrl;
+      return this.$util.isEmpty(this.loginInfo) ? "" : this.loginInfo.avatar;
     }
   },
-  onLoad(option) {},
+  onLoad(option) {
+  },
   onPullDownRefresh() {
     this.init();
     uni.stopPullDownRefresh();

+ 0 - 2
store/src/mixins/globalMixins.js

@@ -59,9 +59,7 @@ export default {
 							});
 						}
 					}
-
 					getUser()
-
 				})
 		}
 

+ 1 - 1
store/src/utils/auth.js

@@ -101,7 +101,7 @@ export async function wxLoginFn(update) {
 
 					uni.setStorageSync('token', subRes.data.token)
 					uni.setStorageSync('shopId', subRes.data.shopId)
-					store.commit('setLoginInfo', subRes.data.user)
+					store.commit('setLoginInfo', subRes.data.admin)
 
 					//启动更新逻辑 shish 2020.5.18
 					if (subRes.data.update == 1) {