Procházet zdrojové kódy

feat: 移动端企业列表显示隐藏逻辑调整

cuiyalong před 1 rokem
rodič
revize
e78cfdf6fa

+ 4 - 9
apps/mobile/src/views/article/components/ContentAbstractEntList.vue

@@ -3,7 +3,7 @@
     <AbstractEnt
       class="abstract-ent-item"
       v-for="(ent, index) in entDetailList"
-      v-show="ent.totalNum > 0"
+      v-show="ent.show"
       :entType="ent.type"
       :title="ent.name"
       :key="index"
@@ -53,7 +53,7 @@ export default {
         const detail = this.req[e.id] || {}
         return {
           ...e,
-          totalNum: this.calcTotalNum(detail),
+          show: this.calcEntShow(detail),
           detail
         }
       })
@@ -72,15 +72,10 @@ export default {
     }
   },
   methods: {
-    calcTotalNum(item = {}) {
-      const amountCount = item.bidamountCount || 0
-      const biddingCount = item.biddingCount || 0
+    calcEntShow(item = {}) {
       const contactCount = item.contactCount || 0
       const cooperate = item.cooperate || 0
-      const projectCount = item.projectCount || 0
-      return (
-        amountCount + biddingCount + contactCount + cooperate + projectCount
-      )
+      return contactCount || cooperate
     },
     async getEntInfo(type, id) {
       const { data, error_code: code } = await ajaxGetMiniEntInfo(type, id)