Selaa lähdekoodia

修改优酷模板ui 新增用户中心埋点

hml 2 vuotta sitten
vanhempi
commit
799f4f4eda

+ 65 - 16
purchase_H5/src/common/addRecord.js

@@ -6,6 +6,30 @@ import {
 
 import sdk from './buriedPoint'
 
+const activityPoint = (cpnVal, eaVal, ettVal) => {
+  let { phone } = store.state.addrData
+  WoAnalytics.addPoint({
+    ad: '209263oNPKAcWHeWoE',
+    pm: '',
+    at: 'changshi20221101',
+    ett: ettVal,
+    ea: eaVal,
+    cpn: cpnVal,
+    mp: phone
+  })
+}
+
+const overtime = () => {
+  let { product } = store.state.addrData
+  if (store.state.global.js === 0) {
+    if (store.state.global.point === 0) {
+      if (product.spid == '296' || product.spid == '298') {
+        activityPoint('pay_result', 'pay_result_success', 'open')
+      }
+    }
+  }
+}
+
 const loginClick = () => {
   let {
     channelKey,
@@ -67,6 +91,10 @@ const loginSuccess = () => {
   if (store.state.global.js === 0) {
     if (store.state.global.point === 0) {
       VuePageVisitor.setMp(phone);
+
+      if (product.spid == '296' || product.spid == '298') {
+        activityPoint('activity_detail', 'activity_detail_login', 'custom')
+      }
     }
   }
 
@@ -150,6 +178,10 @@ const buyClick = () => {
             })
           }
         }
+
+        if (product.spid == '296' || product.spid == '298') {
+          activityPoint('activity_detail', 'activity_detail_order', 'click')
+        }
       }
     }
   }, 200)
@@ -190,6 +222,13 @@ const buySuccess = () => {
         attr6: product.originalPrice,
       });
     }
+    if (store.state.global.js === 0) {
+      if (store.state.global.point === 0) {
+        if (product.spid == '296' || product.spid == '298') {
+          activityPoint('pay_result', 'pay_result_success', 'open')
+        }
+      }
+    }
   }, 600)
 
 }
@@ -226,6 +265,13 @@ const buyFail = (response) => {
       attr7: response.message
     });
   }
+  if (store.state.global.js === 0) {
+    if (store.state.global.point === 0) {
+      if (product.spid == '296' || product.spid == '298') {
+        activityPoint('pay_result', 'pay_result_failure', 'open')
+      }
+    }
+  }
 }
 
 const getToken = () => {
@@ -311,8 +357,6 @@ const unBuyClick = () => {
     }
   }, 400)
 
-
-
 }
 
 const unBuySuccess = () => {
@@ -907,6 +951,10 @@ const openPage = () => {
           })
         }
       })
+      if (product.spid == '296' || product.spid == '298') {
+        activityPoint('activity_detail', 'activity_detail_view', 'open')
+      }
+
     }
   }
 }
@@ -936,7 +984,7 @@ const flowJihuo = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickTraffic",{
+    sensors.track("clickTraffic", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -968,7 +1016,7 @@ const dialNumber = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickDialing",{
+    sensors.track("clickDialing", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1001,7 +1049,7 @@ const jihuoSolve = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("activateClick1",{
+    sensors.track("activateClick1", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1034,7 +1082,7 @@ const jihuoUnbuy = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("activateClickinsist1",{
+    sensors.track("activateClickinsist1", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1067,7 +1115,7 @@ const memberSolve = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("activateClick2",{
+    sensors.track("activateClick2", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1100,7 +1148,7 @@ const memberUnbuy = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("activateClickinsist2",{
+    sensors.track("activateClickinsist2", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1133,7 +1181,7 @@ const unbuyReason = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickRecentlyclient",{
+    sensors.track("clickRecentlyclient", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1166,7 +1214,7 @@ const unbuyReason1 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickTrafficup",{
+    sensors.track("clickTrafficup", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1198,7 +1246,7 @@ const unbuyReason2 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickPriceexpensive",{
+    sensors.track("clickPriceexpensive", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1230,7 +1278,7 @@ const unbuyReason3 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickMisoperation",{
+    sensors.track("clickMisoperation", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1263,7 +1311,7 @@ const unbuyReason4 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickOther",{
+    sensors.track("clickOther", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1296,7 +1344,7 @@ const unbuyReason5 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickBeactivated",{
+    sensors.track("clickBeactivated", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1328,7 +1376,7 @@ const unbuyReason6 = () => {
     tid: tid
   });
   if (store.state.global.sensors === 0) {
-    sensors.track("clickMemberreceive",{
+    sensors.track("clickMemberreceive", {
       attr4: product.spid,
       attr5: product.productName,
       attr6: product.originalPrice
@@ -1398,5 +1446,6 @@ export default {
   unbuyReason4,
   unbuyReason5,
   unbuyReason6,
-  memberPage
+  memberPage,
+  overtime
 }

+ 3 - 1
purchase_H5/src/common/common.js

@@ -248,10 +248,10 @@ export default {
         iframe.contentWindow.postMessage(JSON.stringify(that.param), that.iframeUrl)
         if (that.pageData.remarks.isMask === '1') {
           that.showZhezhao = true
-
         }
         that.$toast.clear();
       }
+      
     },
     async onMessageSuccess (data) {
       addR.getToken()
@@ -308,6 +308,7 @@ export default {
         }, response => {
           if (response.code !== 500) {
             this.showTimeout = true
+            addR.overtime()
             if (this.pageData.remarks.returnApi && this.pageData.remarks.returnApi !== '' && this.pageData.remarks.returnApi === '1') {
               if (this.pageData.remarks.dispose && this.pageData.remarks.dispose !== '') {
                 outsideJs()
@@ -454,6 +455,7 @@ export default {
         }, response => {
           if (response.code !== 500) {
             this.showTimeout = true
+            addR.overtime()
             if (this.pageData.remarks.returnApi && this.pageData.remarks.returnApi !== '' && this.pageData.remarks.returnApi === '1') {
               if (this.pageData.remarks.dispose && this.pageData.remarks.dispose !== '') {
                 outsideJs()

+ 1 - 1
purchase_H5/src/componentsNew/ruleModal002.vue

@@ -1,5 +1,5 @@
 <template>
-  <van-overlay :show="value" :duration="0.1">
+  <van-overlay :show="value" :duration="0.1" :lock-scroll="false">
     <div class="ruleModalNew ruleModal2" @click.stop>
       <img src="../assets/img/close.png" class="close" @click="closeClick" />
       <div>

+ 5 - 4
purchase_H5/src/templates/templateColorNew/index.scss

@@ -41,7 +41,7 @@
       right: 0;
       top: 140px;
       width: 48px;
-      height: 124px;
+      //height: 124px;
       background: #FFFFFF;
       // box-shadow: 0px 0px 12px 0px #ACACAC;
       opacity: 0.7;
@@ -51,8 +51,9 @@
       color: #000;
       z-index: 5;
       writing-mode: vertical-lr;
-      padding-left: 10px;
-      padding-top: 10px;
+      //padding-left: 10px;
+      //padding-top: 10px;
+      padding: 10px;
       box-sizing: border-box;
     }
 
@@ -412,4 +413,4 @@
     }
   }
 
-}
+}

+ 5 - 4
purchase_H5/src/templates/templateThree/index.scss

@@ -355,7 +355,7 @@
     right: 0;
     top: 140px;
     width: 48px;
-    height: 124px;
+    //height: 124px;
     background: #FFFFFF;
     // box-shadow: 0px 0px 12px 0px #ACACAC;
     opacity: 0.7;
@@ -365,8 +365,9 @@
     color: #000;
     z-index: 5;
     writing-mode: vertical-lr;
-    padding-left: 10px;
-    padding-top: 10px;
+    //padding-left: 10px;
+    //padding-top: 10px;
+    padding: 10px;
     box-sizing: border-box;
   }
 
@@ -403,4 +404,4 @@
       left: 37px;
     }
   }
-}
+}

+ 46 - 32
purchase_H5/src/templates/templateYuku/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="templateYuku" id="temp">
     <div class="banner">
-      <img src="./banner.png" alt="">
+      <img src="./banner.png" alt="" />
     </div>
     <div class="infoBox">
       <div class="infoCell">
@@ -13,7 +13,7 @@
         <div class="name">优酷VIP会员月卡+定向流量</div>
       </div>
       <div class="infoPhone">
-        <input type="text" v-model="phone" placeholder="输入联通手机号">
+        <input type="text" v-model="phone" placeholder="输入联通手机号" />
       </div>
     </div>
     <div class="buyBox" @click="buyClick">立即办理</div>
@@ -23,23 +23,31 @@
           <p style="margin: 0; padding: 0">我已阅读并同意</p>
         </div>
       </van-checkbox>
-      <span class="span" @click="showConceal = true">《隐私声明》</span><span class="span" @click="showRule = true">《产品说明》</span>
+      <span class="span" @click="showConceal = true">《隐私声明》</span
+      ><span class="span" @click="showRule = true">《产品说明》</span>
     </div>
     <div class="explain">
-      <div class="explainTitle"><span class="spanLeft">一</span>活动规则<span class="spanRight">一</span></div>
+      <div class="explainTitle">
+        <span class="spanLeft">一</span>活动规则<span class="spanRight"
+          >一</span
+        >
+      </div>
       <div class="main" v-html="pageData.mainProduct.givePhoneInfo"></div>
     </div>
 
     <!-- 隐私条款 -->
     <conceal v-model="showConceal" :pageData="pageData"></conceal>
     <!-- 产品说明 -->
-    <rule-modal v-if="showRule" @ruleShow="showRule = false" :pageData="pageData"></rule-modal>
+    <rule-modal
+      v-if="showRule"
+      @ruleShow="showRule = false"
+      :pageData="pageData"
+    ></rule-modal>
   </div>
 </template>
 
 <script>
-
-import common from '@/common/common'
+import common from "@/common/common";
 import conceal from "../../components/hideModal.vue";
 import ruleModal from "../../components/ruleModal002.vue";
 export default {
@@ -48,39 +56,39 @@ export default {
     ruleModal,
     conceal,
   },
-  data () {
+  data() {
     return {
       phone: "",
       checked: false,
       showConceal: false,
       showRule: false,
-    }
+    };
   },
-  created () {
-    let mobileStr = location.href.split('?')
+  created() {
+    let mobileStr = location.href.split("?");
     if (mobileStr.length > 1) {
       const res = {};
       const search = mobileStr[1];
-      const strs = search.split('&');
+      const strs = search.split("&");
       for (let i = 0; i < strs.length; i++) {
-        res[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1]);
+        res[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
       }
       if (res.mobile) {
-        const Base64 = require('js-base64').Base64
-        this.phone = Base64.decode(res.mobile)
+        const Base64 = require("js-base64").Base64;
+        this.phone = Base64.decode(res.mobile);
       }
     }
   },
   methods: {
-    buyClick () {
+    buyClick() {
       if (this.checked == false) {
-        this.$toast('请勾选隐私声明')
+        this.$toast("请勾选隐私声明");
       } else {
-        this.openIframe()
+        this.openIframe();
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss">
@@ -106,29 +114,30 @@ export default {
   .infoBox {
     width: 670px;
     margin: 0 auto;
+    margin-top: -35px;
     .infoCell {
       width: 100%;
-      height: 120px;
+      height: 94px;
       display: flex;
       justify-content: space-between;
       border-bottom: 1px solid #d9d9d9;
-      font-family: PingFang SC, PingFang SC-Regular;
+      font-family: PingFang SC, PingFang SC-Bold;
       font-size: 30px;
-      line-height: 170px;
+      line-height: 130px;
       .title {
-        font-weight: 400;
+        font-weight: 700;
         color: #616161;
         text-align: left;
       }
       .name {
         font-weight: 700;
         text-align: right;
-        color: #000000;
+        color: #333;
       }
     }
     .infoPhone {
       width: 100%;
-      height: 120px;
+      height: 108px;
       font-size: 40px;
       // line-height: 170px;
       font-weight: 700;
@@ -142,9 +151,12 @@ export default {
         outline: none;
         width: 100%;
         height: 100%;
-        padding-top: 50px;
+        padding-top: 40px;
         box-sizing: border-box;
       }
+      input::placeholder{
+        color: #000000;
+      }
     }
   }
   .buyBox {
@@ -193,13 +205,15 @@ export default {
 
   .explain {
     width: 670px;
-    margin: 40px auto;
+    margin: 0 auto;
+    // margin-top: 20px;
     .explainTitle {
       width: 100%;
       font-weight: 700;
-      font-size: 40px;
+      font-size: 34px;
       text-align: center;
-      margin-bottom: 20px;
+      margin-top: 60px;
+      margin-bottom: 28px;
       .spanLeft {
         margin-right: 20px;
       }
@@ -210,7 +224,7 @@ export default {
     .main {
       word-break: break-all;
       p {
-        color: #616161;
+        color: #9b9b9b;
         font-size: 26px;
         line-height: 40px;
         // margin: 20px 0 0 0;

+ 21 - 3
purchase_H5/src/views/members/member001.vue

@@ -14,7 +14,7 @@
         <div class="inner">
           <div class="title-box">
             <div class="title">
-              {{ item.productName }}
+              {{ (item.memberName != "" && item.memberName != null)  ? item.memberName : item.productName }}
             </div>
             <div v-if="
                 item.resultcode === '9083' &&
@@ -39,12 +39,23 @@
         <div class="inner">
           <div class="title-box">
             <div class="title">
-              {{ itemInfo.productName }}
+              {{ (itemInfo.memberName != "" && itemInfo.memberName != null)  ? itemInfo.memberName : itemInfo.productName }}
             </div>
             <div v-if="memberState !== 0" @click="receiveMember()">领取</div>
             <div v-else class="isMem">已领取</div>
           </div>
         </div>
+<!--      </div>-->
+<!--            <div class="order"  v-for="item in fuhelist">-->
+<!--                <div class="inner">-->
+<!--            <div class="title-box">-->
+<!--                <div class="title">-->
+<!--                    {{ item.productName }}-->
+<!--                </div>-->
+<!--                <div v-if="memberState !== 0" @click="receiveMember()">{{item.errorinfo}}</div>-->
+<!--                <div v-else class="isMem">已领取</div>-->
+<!--            </div>-->
+<!--        </div>-->
       </div>
     </div>
     <div class="hint">显示您的会员领取记录</div>
@@ -67,6 +78,7 @@ export default {
       filter: filter,
       memberState: 1,
       itemInfo: {},
+        fuhelist:null
     };
   },
   filters: {
@@ -111,6 +123,11 @@ export default {
     );
     this.itemInfo.activeType = this.$route.query.activeType;
     this.itemInfo.productName = this.$route.query.productName;
+    if (this.itemInfo.spid == 1219) {
+        this.itemInfo.memberName = "keep周会员*2";
+    }else{
+        this.itemInfo.memberName = null
+    }
     if (
       this.itemInfo.isCompositeProduct === 0 ||
       this.itemInfo.isCompositeProduct === null
@@ -172,6 +189,7 @@ export default {
       })
         .then((res) => {
           if (res.code === 10000) {
+              // this.fuhelist = res.data
             for (var i = 0; i < res.data.length; i++) {
               if (res.data[i].resultcode !== "9087") {
                 this.memberState = 1;
@@ -330,4 +348,4 @@ export default {
     text-decoration: underline;
   }
 }
-</style>
+</style>