Browse Source

Merge branch 'fix'

shenjj 7 years ago
parent
commit
94a6ec2b40
1 changed files with 15 additions and 6 deletions
  1. 15 6
      pages/mobile/user/index.vue

+ 15 - 6
pages/mobile/user/index.vue

@@ -30,9 +30,9 @@
       <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
       <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
     </ul>
     </ul>
     <ul class="switch-list" v-if="userType !== 'buyer'">
     <ul class="switch-list" v-if="userType !== 'buyer'">
-      <li :class="{active: activeType == 'oppor'}"   @click="activeType = 'oppor'">我的商机</li>
-      <li :class="{active: activeType == 'provider'}"  @click="activeType = 'provider'">产品管理</li>
-      <li :class="{active: activeType == 'mystore'}"  @click="activeType = 'mystore'">我的店铺</li>
+      <li :class="{active: activeType == 'oppor', noshop: !shopuuid}"   @click="activeType = 'oppor'">我的商机</li>
+      <li :class="{active: activeType == 'provider', noshop: !shopuuid}"  @click="activeType = 'provider'">产品管理</li>
+      <li :class="{active: activeType == 'mystore'}"  @click="activeType = 'mystore'" v-if="shopuuid">我的店铺</li>
     </ul>
     </ul>
     <!-- 买家中心 我的求购 -->
     <!-- 买家中心 我的求购 -->
     <div v-if="activeType == 'seek' || activeType == 'oppor'">
     <div v-if="activeType == 'seek' || activeType == 'oppor'">
@@ -422,10 +422,11 @@
             this.GetEnterpriseList().then(res => {
             this.GetEnterpriseList().then(res => {
               this.GetEnterpriseListData = res.data.content
               this.GetEnterpriseListData = res.data.content
               this.EnterprisePage = res.data.totalPages
               this.EnterprisePage = res.data.totalPages
-              this.isGetResoure = true
             })
             })
           } else if (val === 'mystore') {
           } else if (val === 'mystore') {
-            this.$router.push(`/mobile/shop/${this.$store.state.option.storeStatus.data.uuid}`)
+            if (this.$store.state.option.storeStatus.data.uuid) {
+              this.$router.push(`/mobile/shop/${this.shopuuid}`)
+            }
           }
           }
         }
         }
       }
       }
@@ -810,11 +811,16 @@
       },
       },
       // 是否展示空数据
       // 是否展示空数据
       StateNone() {
       StateNone() {
-        if (this.activeType === 'provider' && this.isGetResoure) {
+        if (this.activeType === 'provider') {
           return this.GetEnterpriseListData.length === 0
           return this.GetEnterpriseListData.length === 0
+        } else if (this.activeType === 'oppor') {
+          return false
         } else {
         } else {
           return (this.activeType !== 'seek') && ((this.collectSave.totalElements === 0 && this.activeType === 'comp') || (this.focusPage.totalElements === 0 && this.activeType === 'store') || (this.collectSave.totalElements === 0 && this.focusPage.totalElements === 0) || this.GetEnterpriseListData.totalElements === 0)
           return (this.activeType !== 'seek') && ((this.collectSave.totalElements === 0 && this.activeType === 'comp') || (this.focusPage.totalElements === 0 && this.activeType === 'store') || (this.collectSave.totalElements === 0 && this.focusPage.totalElements === 0) || this.GetEnterpriseListData.totalElements === 0)
         }
         }
+      },
+      shopuuid() {
+        return this.$store.state.option.storeStatus.data.uuid
       }
       }
     }
     }
   }
   }
@@ -1064,6 +1070,9 @@
       }
       }
     }
     }
     ul.switch-list {
     ul.switch-list {
+      .noshop {
+        width: 50%;
+      }
       li {
       li {
         display: inline-block;
         display: inline-block;
         width: 2.5rem;
         width: 2.5rem;