Parcourir la source

feat: 修复埋点无数据问题

zhangyuhan il y a 1 mois
Parent
commit
ebfba9ea0b

+ 6 - 1
apps/bigmember_pc/src/views/order/components/adsense/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="adsense" v-if="url">
     <div class="content">
-      <img :src="url" alt="" @click="openUrl" />
+      <img :src="url" :alt="adInfo.name" @click="openUrl" />
     </div>
   </div>
 </template>
@@ -20,6 +20,11 @@ export default {
       link: ''
     }
   },
+  computed: {
+    adInfo () {
+      return this.adList[0] || {}
+    }
+  },
   created() {
     this.getAdList(this.code)
   },

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

@@ -23,6 +23,13 @@ const PrototypeBindPhonePlugin = {
 
     Vue.prototype.$testBindPhone = function (options) {
       const { props = {}, slots, pass, bound, next, close } = options
+
+      // 因为事件冒泡终止,需要手动上报埋点
+      // 绑定成功埋点
+      try {
+        window.__EasyJTrack.addTrack(props.name)
+      } catch (error) {}
+
       props.visible = true
       const needPhoneBound = Cookies.get('EXPERIENCESIGN') === 'experiencing'
       // 绑定成功cookie里塞的值