Ver Fonte

fix(controller): 首页获取用户信息不在走请求,改为vuex

xiansin há 4 anos atrás
pai
commit
cb04dfae46
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      pages/index/index.vue

+ 4 - 1
pages/index/index.vue

xqd xqd
@@ -1,7 +1,7 @@
 <template>
     <app-layout :haveBackground="haveBackground">
         <app-my-share
-                :shareInfo="shareInfo"
+                :shareInfo="userInfo.identity"
                 :tabBarNavs="tabBarNavs"
                 :mall="mall"
                 :fixed="shareFixed"></app-my-share>
@@ -328,6 +328,9 @@
                 config: state => state.mall.setting,
                 mall: state => state.mall,
             }),
+            ...mapState( {
+                userInfo: state => state.user.info,
+            }),
             themeObject:function() {
                 return {
                     back: this.getTheme + '-m-back ' + this.getTheme,