Переглянути джерело

Merge branch 'dev/v1.1.1_tsz' of jianyu/web into feature/v1.1.1

汤世哲 3 місяців тому
батько
коміт
b019e90a1d

+ 56 - 15
apps/mobile/src/views/article/components/ContentHeader.vue

@@ -39,13 +39,22 @@
         参标人:{{ cbPersonText }}
       </span>
       <!-- 无参标人和时间一行 -->
-      <div
-        v-else-if="showRenMaiButton"
-        class="relationship-button"
-        @click="findRenMai"
-      >
-        <span class="relationship-icon j-icon j-base-icon icon-renmai" />
-        <span class="relationship-text">找人脉</span>
+      <div v-else-if="showRenMaiButton" class="sub-info-line">
+        <div v-if="showCreditReport" class="creditreport-button" @click="creditReport">
+          <span class="creditreport-text">投标企业信用报告</span>
+        </div>
+        <div
+          class="relationship-button"
+          @click="findRenMai"
+        >
+          <span class="relationship-icon j-icon j-base-icon icon-renmai" />
+          <span class="relationship-text">找人脉</span>
+        </div>
+      </div>
+      <div v-else class="sub-info-line">
+        <div v-if="showCreditReport" class="creditreport-button" @click="creditReport">
+          <span class="creditreport-text">投标企业信用报告</span>
+        </div>
       </div>
     </div>
     <div v-if="showRenMaiButton2" class="sub-info-line">
@@ -139,6 +148,9 @@ export default {
         return ''
       }
     },
+    showCreditReport() {
+      return articleTypeArr.includes(this.content?._ob?.topType || this.content?._ob?.subType || '')
+    },
     showRenMaiButton() {
       if (this.IsSunPublishContent) {
         return ''
@@ -155,7 +167,6 @@ export default {
       return this.otherModel.collectionTags
     }
   },
-  created() {},
   methods: {
     async onCollectionTagClick(tag) {
       if (this.beforeLeavePage) {
@@ -169,7 +180,6 @@ export default {
     },
     async checkHasRemMaiPower() {
       this.renmai.loading = true
-      console.log('checkHasRemMaiPower')
       try {
         const res = await getUserResource()
         if (res && Array.isArray(res.data)) {
@@ -183,6 +193,25 @@ export default {
         this.renmai.loading = false
       }
     },
+    creditReport() {
+      const buyer = this.summary?.buyers[0]?.name
+      const typeName = this.content?._ob?.topType || this.content?._ob?.subType
+      const breaker_name = `投标企业信用报告_${typeName}`
+      // 区分标讯类型埋点
+      try {
+        window.__EasyJTrack.addTrack(breaker_name, {
+          breaker_name
+        })
+      }
+      catch (e) {
+        console.log(e)
+      }
+      this.$router.push({
+        path: '/order/create/creditreport',
+        query: buyer ? { buyer } : {}
+      })
+    },
+
     async findRenMai() {
       const hasPower = await this.checkHasRemMaiPower()
       if (hasPower) {
@@ -295,20 +324,32 @@ export default {
 }
 
 .sub-info-line-r {
-  position: relative;
+  display: flex;
+  align-items: center;
+}
+.creditreport-button {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-right: 10px;
+  padding: 2px 8px;
+  line-height: 20px;
+  color: #fff;
+  background: linear-gradient(to right, #5FD4E3, #28C1E2);
+  border-radius: 4px;
 }
 .relationship-button {
-  position: relative;
-  right: -16px;
-  top: 0;
+  // position: relative;
+  // right: -16px;
+  // top: 0;
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 2px 12px;
   height: 24px;
   color: #fff;
-  background-color: $main;
-  border-radius: 14px 0 0 14px;
+  background: linear-gradient(to right, #5FD4E3, #28C1E2);
+  border-radius: 4px;
   .j-icon {
     margin-right: 4px;
     width: 12px;

+ 0 - 12
apps/mobile/src/views/article/content.vue

@@ -450,18 +450,6 @@ export default {
       return this.bindPhone
     }
   },
-  beforeCreate() {
-    // 三级页默认弹出客户端弹窗问题,临时解决方案
-    try {
-      window.$openExternalLinkTransfer = window.JyObj.openExternalLink
-      window.JyObj.openExternalLink = function () {
-        console.log('window.$openExternalLinkTransfer', window.$openExternalLinkTransfer)
-      }
-    }
-    catch (error) {
-      console.error(error)
-    }
-  },
   async created() {
     this.appHeaderActions()
     await this.getPageState()