Browse Source

优化 移动端卖家中心 产品管理 数据为空的提示

shenjj 7 years ago
parent
commit
ca5ecef242
1 changed files with 10 additions and 1 deletions
  1. 10 1
      pages/mobile/user/index.vue

+ 10 - 1
pages/mobile/user/index.vue

@@ -212,7 +212,7 @@
       <!--</div>-->
     </div>
     <!-- /end 卖家中心 产品管理 -->
-    <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0) || GetEnterpriseListData.totalElements == 0)">
+    <div class="none-state" v-if="StateNone">
       <img src="/images/mobile/@2x/empty-collect.png">
       <p v-text="getRemindText()"></p>
       <nuxt-link to="/">返回首页</nuxt-link>
@@ -417,6 +417,7 @@
             this.GetEnterpriseList().then(res => {
               this.GetEnterpriseListData = res.data.content
               this.EnterprisePage = res.data.totalPages
+              this.isGetResoure = true
             })
           } else if (val === 'mystore') {
             this.$router.push(`/mobile/shop/${this.$store.state.option.storeStatus.data.uuid}`)
@@ -794,6 +795,14 @@
           return this.chooseItem.pbranden
         }
         return ''
+      },
+      // 是否展示空数据
+      StateNone() {
+        if (this.activeType === 'provider' && this.isGetResoure) {
+          return this.GetEnterpriseListData.length === 0
+        } 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)
+        }
       }
     }
   }