소스 검색

修改我的店铺跳转链接

q867427795 7 년 전
부모
커밋
12197d828d
3개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 2
      components/default/RightBar.vue
  2. 2 1
      pages/provider/factories.vue
  3. 3 1
      pages/store/_uuid/index.vue

+ 3 - 2
components/default/RightBar.vue

@@ -6,7 +6,7 @@
           <a @click="goShop" class="title" target="_blank">
             <i class="iconfont icon-dianpu icon-xlg"></i>
           </a>
-          <div class="sidebar-menu"><a title="我的店铺" target="_blank">我的店铺</a></div>
+          <div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>
         </li>
         <li class="right-bar-item" @mouseenter="loadCarCount()">
           <a @click="goCart" class="title" target="_blank">
@@ -99,6 +99,7 @@
     },
     computed: {
       user () {
+        console.log(this.$store.state.option)
         return this.$store.state.option.user
       },
       cartCount () {
@@ -182,7 +183,7 @@
         }
       },
       goShop: function () {
-        window.location.href = '/vendor#/index'
+        window.location.href = `/store/${this.storeStatus.uuid}`
       },
       goWebChat: function () {
         if (!this.user.logged) {

+ 2 - 1
pages/provider/factories.vue

@@ -24,7 +24,8 @@ export default {
       store.dispatch('provider/loadSalesStore', { isOriginal: true }),
       store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
       store.dispatch('provider/loadRecommendOriginal', { types: 'ORIGINAL_FACTORY', num: 5 }),
-      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' })
+      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' }),
+      store.dispatch('loadStoreStatus', { op: 'check' })
     ])
   },
   components: {

+ 3 - 1
pages/store/_uuid/index.vue

@@ -25,7 +25,9 @@ export default {
     return Promise.all([
       store.dispatch('shop/findStoreInfoFromUuid', params),
       store.dispatch('shop/findRecommendProducts', params),
-      store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
+      store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 }),
+      store.dispatch('loadStoreStatus', { op: 'check' })
+
     ])
   },
   async asyncData ({ params }) {