Преглед изворни кода

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

xiansin пре 4 година
родитељ
комит
cb04dfae46
1 измењених фајлова са 4 додато и 1 уклоњено
  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,