Forráskód Böngészése

feat: 支持定制化客户 拓普 详情页需求

zhangyuhan 1 éve
szülő
commit
ab50dbc693

+ 31 - 2
apps/mobile/src/composables/attachment-download/component/AttachmentDownload.vue

@@ -6,7 +6,7 @@
           <span class="j-icon icon-data-download"></span>
           <span class="file-attachment-text text-nowrap">附件下载</span>
         </span>
-        <div class="right-content flex flex-items-center">
+        <div class="right-content flex flex-items-center" v-if="canShowTip">
           <!-- 免费用户,无体验次数(没体验过) -->
           <template v-if="isFree && freeFileNum === 0">
             <span class="attachment-tag text-nowrap">
@@ -83,6 +83,10 @@ export default {
     [Icon.name]: Icon
   },
   props: {
+    customSkip: {
+      type: Boolean,
+      default: false
+    },
     id: {
       type: String,
       required: true,
@@ -154,6 +158,16 @@ export default {
       power: (state) => state.user.power,
       userInfo: (state) => state.user.userInfo
     }),
+    IsCustomTopNet () {
+      return this.customSkip
+    },
+    canShowTip() {
+      // 定制化用户不展示提示和留资
+      if (this.IsCustomTopNet) {
+        return false
+      }
+      return true
+    },
     // 免费用户免费体验次数
     freeFileNum() {
       if (this.resourcePack.number > 0) {
@@ -234,6 +248,11 @@ export default {
       })
     },
     async startDownloadFile(file) {
+      // 定制化用户直接下载
+      if (this.IsCustomTopNet) {
+        return this.downloadFile(file)
+      }
+
       if (this.isFree) {
         // 免费用户
         // 判断有无体验过 0:未体验过
@@ -357,7 +376,17 @@ export default {
         // downUrl: 原始url
         // fileUrl: 下载地址
         const { downUrl, fileUrl } = await this.getAttachmentInfo(file)
-        this.refreshResourcePackCount()
+
+        let skipRefresh = false
+        // 定制化用户不展示提示和留资
+        if (this.IsCustomTopNet) {
+          skipRefresh = true
+        }
+
+        if (!skipRefresh) {
+          this.refreshResourcePackCount()
+        }
+
 
         if (downUrl && fileUrl) {
           if (platform === 'wx') {

+ 6 - 1
apps/mobile/src/views/article/components/AttachmentDownloadCard.vue

@@ -1,5 +1,6 @@
 <template>
   <attachmentDownload
+    :custom-skip="IsCustomTopNet"
     :id="content.id"
     :title="content.title"
     :attachmentList="attachmentList"
@@ -22,7 +23,11 @@ export default {
       content: (state) => state.article.mainModel.content,
       attachmentList() {
         return this.content.attachments || []
-      }
+      },
+      IsCustomTopNet()  {
+        return true
+        // return this.content.IsCustomTopNet || false
+      },
     })
   },
   created() {},

+ 27 - 3
apps/mobile/src/views/article/components/ContentAbstract.vue

@@ -230,7 +230,14 @@
           <div class="abstract-line-label">
             {{ winner.isCandidate ? '中标候选人' : '中标单位' }}
           </div>
-          <div class="abstract-line-value" @click="goToEntPortrait(winner)">
+
+          <div class="abstract-line-value" v-if="IsCustomTopNet">
+            <span class="ellipsis-2">
+              {{ winner.name }}
+            </span>
+          </div>
+
+          <div v-else class="" @click="goToEntPortrait(winner)">
             <span
               class="ellipsis-2"
               :class="{
@@ -314,6 +321,10 @@ export default {
     [Icon.name]: Icon
   },
   props: {
+    customSkip: {
+      type: Boolean,
+      default: false
+    },
     futureProject: {
       type: Boolean,
       default: false
@@ -324,7 +335,7 @@ export default {
     return {
       sheet: {
         telSelect: false,
-        
+
       },
       telSheetActions: [
         // { name: '选项一', value: '1111' },
@@ -340,11 +351,24 @@ export default {
     summaryList() {
       return this.summary.list
     },
+    IsCustomTopNet () {
+      return this.customSkip
+    },
     summaryMap() {
       const map = {}
       this.summaryList.forEach((s) => {
         if (s.key) {
-          map[s.key] = s
+          const tempS = Object.assign({}, s)
+          if (this.IsCustomTopNet) {
+            if (tempS.link) {
+              tempS.link = false
+            }
+            if (tempS.tel) {
+              tempS.tel = ''
+            }
+          }
+
+          map[s.key] = tempS
         }
       })
       return map

+ 25 - 3
apps/mobile/src/views/article/content.vue

@@ -31,10 +31,12 @@
             <van-tab title="摘要" key="abstract" v-if="baseModuleShow.summary">
               <div class="tab-module">
                 <ContentAbstract
+                  :custom-skip="IsCustomTopNet"
                   class="content-abstract-module"
                   :beforeLeavePage="beforeLeavePage"
                 />
                 <ContentAbstractEntList
+                  v-if="!IsCustomTopNet"
                   class="content-abstract-ent-list-module"
                   :beforeLeavePage="beforeLeavePage"
                 />
@@ -49,7 +51,7 @@
                 class="tab-module"
                 :beforeLeavePage="beforeLeavePage"
               />
-              <NpsCard class="nps-module" ref="npsCard" v-if="canRead" />
+              <NpsCard class="nps-module" ref="npsCard" v-if="canShowNpsModule" />
             </van-tab>
             <!-- 进度 -->
             <van-tab
@@ -106,6 +108,7 @@
             <FreeUserBiddingMask v-else :beforeLeavePage="beforeLeavePage" />
           </template>
           <AdSingle
+            v-if="!IsCustomTopNet"
             :ad="getContentAdID"
             :showCloseIcon="false"
             radius
@@ -283,6 +286,9 @@ export default {
       expandModel: (state) => state.article.expandModel,
       otherModel: (state) => state.article.otherModel
     }),
+    IsCustomTopNet()  {
+      return this.content.IsCustomTopNet || false
+    },
     openid() {
       return this.preAgentInfo.openid
     },
@@ -296,14 +302,25 @@ export default {
     canRead() {
       return this.content.isCanRead
     },
+    canShowNpsModule () {
+      if (this.IsCustomTopNet) {
+        return false
+      }
+      return this.canRead
+    },
     baseModuleShow() {
       return this.mainModel.moduleShow
     },
     advancedModuleShow() {
-      return this.expandModel.moduleShow
+      return Object.assign({}, this.expandModel.moduleShow, {
+        tbService: this.IsCustomTopNet ? false : this.expandModel.moduleShow.tbService
+      })
     },
     // 客户推荐模块是否展示
     customerRecommendModuleShow() {
+      if (this.IsCustomTopNet) {
+        return false
+      }
       // 如果是有权限用户(权限7),则有数据展示,无数据不展示。无权限7用户则一直展示,展示广告引导
       if (this.hasCustomerModulePower) {
         return this.advancedModuleShow.customerRecommend
@@ -727,8 +744,13 @@ export default {
   margin-top: 8px;
 }
 
+.content-abstract-ent-list-module + .data-export-banner-module {
+  padding-top: 0;
+
+}
+
 .data-export-banner-module {
-  padding: 0 12px;
+  padding: 8px 12px 0 12px;
 }
 
 .share-subtitle-container {