浏览代码

fix:广告位、标讯详情页阳光直采绑定手机号弹框应用

yangfeng 4 月之前
父节点
当前提交
672c6b70af

+ 5 - 6
apps/mobile/src/components/ad/Ad.vue

@@ -13,9 +13,8 @@
       :src="getConfig.pic"
       :alt="getConfig.name"
       :style="getStyle"
-      @click.stop="openAD"
+      @click.stop="bindPhoneOpenAd"
       @load="loadSuccess"
-      v-bound-phone="bindPhoneOpenAD()"
     >
       <div v-if="showTag" class="tag-text">广告</div>
       <div v-if="showCloseIcon" class="close" @click.stop="close">
@@ -233,9 +232,9 @@ export default {
         console.warn(msg)
       }
     },
-    bindPhoneOpenAD() {
-      const { script, name } = this.getConfig
-      return {
+    bindPhoneOpenAd() {
+      const { script, name } = this.getConfig || {}
+      this.$testBindPhone({
         props: {
           name: '广告位-' + name
         },
@@ -243,7 +242,7 @@ export default {
         next: () => {
           this.openAD()
         }
-      }
+      })
     }
   }
 }

+ 3 - 4
apps/mobile/src/components/ad/pop-screen/index.vue

@@ -17,8 +17,7 @@
         width: getStyle.width,
         height: getStyle.height
       }"
-      @click.stop="openAD"
-      v-bound-phone="bindPhoneOpenAd()"
+      @click.stop="bindPhoneOpenAd"
     >
       <AdSvga
         v-if="isSvgaType"
@@ -165,7 +164,7 @@ export default {
     },
     bindPhoneOpenAd() {
       const { script, name } = this.config
-      return {
+      this.$testBindPhone({
         props: {
           name: '广告位-' + name
         },
@@ -173,7 +172,7 @@ export default {
         next: () => {
           this.openAD()
         }
-      }
+      })
     }
   }
 }

+ 15 - 0
apps/mobile/src/views/article/components/ContentAbstract.vue

@@ -37,6 +37,7 @@
               'highlight-text underline clickable': summaryMap.buyer?.link
             }"
             @click="goToBuyerPortrait(summaryMap.buyer, 'link')"
+            v-bound-phone="bindPhoneGoToBuyerPortrait(summaryMap.buyer, 'link')"
           >
             {{ summaryMap.buyer?.value }}
           </span>
@@ -136,6 +137,7 @@
               'free-view': summaryMap.buyer?.isFreeView
             }"
             @click="goToBuyerPortrait(summaryMap.buyer, 'link')"
+            v-bound-phone="bindPhoneGoToBuyerPortrait(summaryMap.buyer, 'link')"
           >
             {{ summaryMap.buyer?.value }}
           </span>
@@ -174,6 +176,9 @@
               v-if="summaryMap.buyer?.link && summaryMap.buyerContactInfo?.tel"
               class="abstract-line-value-action more-tel clickable"
               @click="goToBuyerPortrait(summaryMap.buyer, 'tel')"
+              v-bound-phone="
+                bindPhoneGoToBuyerPortrait(summaryMap.buyer, 'tel')
+              "
             >
               <span class="a-l-v-a-text">更多联系人</span>
               <van-icon name="arrow" />
@@ -525,6 +530,16 @@ export default {
           from: encodeURIComponent(location.href)
         }
       })
+    },
+    bindPhoneGoToBuyerPortrait(item, anchor) {
+      return {
+        props: {
+          name: `标讯详情页-采购单位点击查看`
+        },
+        next: () => {
+          this.goToBuyerPortrait(item, anchor)
+        }
+      }
     }
   }
 }

+ 19 - 9
apps/mobile/src/views/article/content.vue

@@ -677,17 +677,27 @@ export default {
       }
     },
     clickFreeView() {
-      this.beforeLeavePage()
-      let source = 'peugeot_view_infor'
-      if (this.toBCustom) {
-        source = `${this.$env.platform}_sunlight_viewdetails`
-      }
-      openAppOrWxPage(LINKS.留资, {
-        query: {
-          source,
-          infoid: this.content.id
+      this.$testBindPhone({
+        props: {
+          name: '标讯详情页-采购联系人/联系电话'
+        },
+        next: () => {
+          goToFreeViewPage()
         }
       })
+      function goToFreeViewPage() {
+        this.beforeLeavePage()
+        let source = 'peugeot_view_infor'
+        if (this.toBCustom) {
+          source = `${this.$env.platform}_sunlight_viewdetails`
+        }
+        openAppOrWxPage(LINKS.留资, {
+          query: {
+            source,
+            infoid: this.content.id
+          }
+        })
+      }
     },
     beforeLeavePage() {
       this.saveStateToStorage()

+ 14 - 4
apps/mobile/src/views/search/result/sun/index.vue

@@ -134,6 +134,7 @@
                 <span
                   class="buyer-item link-clickable"
                   @click.stop="toToBuyerProfile(item.text)"
+                  v-bound-phone="bindPhoneToBuyerProfile(item.text)"
                   >{{ item.text }}</span
                 >
               </template>
@@ -142,6 +143,7 @@
                   v-if="item.text === '点击查看'"
                   class="buyer-item link-clickable"
                   @click.stop="toToBuyerProfile(item.text)"
+                  v-bound-phone="bindPhoneToBuyerProfile(item.text)"
                   >{{ item.text }}</span
                 >
                 <span class="buyer-item link-clickable" v-else>{{
@@ -2253,6 +2255,16 @@ export default {
         keyStr,
         `<span class="highlight-text-orange-bd">${keyStr}</span>`
       )
+    },
+    bindPhoneToBuyerProfile(id) {
+      return {
+        props: {
+          name: '阳光直采详情页-采购单位点击查看'
+        },
+        next: () => {
+          this.toToBuyerProfile(id)
+        }
+      }
     }
   }
 }
@@ -2410,8 +2422,7 @@ export default {
   border-radius: 8px;
   border: 1px solid transparent;
   background-clip: padding-box, border-box;
-  background-image:
-    linear-gradient(#e8ffff 40%, #ffffff 100%),
+  background-image: linear-gradient(#e8ffff 40%, #ffffff 100%),
     linear-gradient(to right, #2abed1, #4de4f84c, #2abed1);
   background-origin: padding-box, border-box;
   .tab-right {
@@ -2607,8 +2618,7 @@ export default {
   color: #171826;
   border: 0.5px solid transparent;
   background-clip: padding-box, border-box;
-  background-image:
-    linear-gradient(#e8ffff 40%, #ffffff 100%),
+  background-image: linear-gradient(#e8ffff 40%, #ffffff 100%),
     linear-gradient(to right, #2abed1 10%, #4de4f84c 30%, #2abed1);
   background-origin: padding-box, border-box;
   border-radius: 8px;