瀏覽代碼

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,