Browse Source

fix: 修复广告位点击问题

zhangyuhan 3 months ago
parent
commit
c91bfed133

+ 5 - 4
apps/mobile/src/components/ad/Swipe.vue

@@ -134,14 +134,15 @@ export default {
       return openLinkOfAd(ad)
     },
     bindPhoneOpen(item) {
+      const next = () => {
+        this.open(item)
+      }
       return {
         props: {
           name: '广告位-' + item.title || item.name
         },
-        pass: !item?.script ? this.open : null,
-        next: () => {
-          this.open(item)
-        }
+        pass: !item?.script?.tip ? next : null,
+        next: next
       }
     }
   }

+ 1 - 1
plugins/bind-phone-mobile/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@jy/plugin-bind-phone",
-  "version": "1.0.7",
+  "version": "1.0.8",
   "private": false,
   "description": "移动端绑定手机弹框插件",
   "files": [

+ 7 - 0
plugins/bind-phone-mobile/src/utils/directives/bind-phone.js

@@ -9,6 +9,13 @@ const BindPhoneDirective = {
       // event.isProgrammaticClick = false
       event.stopPropagation()
       event.preventDefault()
+      // 手动上报点击信息
+      try {
+        window.__EasyJTrack.addCustomEventTrack(event)
+      } catch (e) {
+        console.warn(e)
+      }
+
       const { props = {}, pass, bound, close, next } = value
       /**
        * props: 接受的传参