Browse Source

feat: 新增埋点上报

zhangyuhan 4 years ago
parent
commit
0e21e64a40

+ 3 - 3
src/jfw/modules/app/src/web/templates/weixin/search/tabSearch.html

@@ -629,7 +629,7 @@
                                 </div>
                                 <div class="pop-bottom" v-if="isWaitBuy">
                                     <van-button type="default" @click="resetCondition">再想一想</van-button>
-                                    <van-button type="primary" @click="goUpBuyPage">去开通</van-button>
+                                    <van-button type="primary" @click="goUpBuyPage(false)">去开通</van-button>
                                 </div>
                             </div>
                         </div>
@@ -673,7 +673,7 @@
                                 <div class="img-empty"></div>
                                 <span>未搜索到符合条件的企业</span>
                             </div>
-                            <div class="up-button" @click="goUpBuyPage" style="min-height: 0.64rem" v-else-if="showUpTip">升级会员,查看更多搜索结果</div>
+                            <div class="up-button" @click="goUpBuyPage('企业搜索底部-去升级')" style="min-height: 0.64rem" v-else-if="showUpTip">升级会员,查看更多搜索结果</div>
                             <div class="ent-more-tip" v-if="false">
                                 <i class="j-icon base-icon icon-up-allow"></i>
                                 <span>上拉查看更多搜索结果</span>
@@ -769,7 +769,7 @@
                         </div>
                         <div class="pop-bottom" v-if="isWaitBuy">
                             <van-button type="default" @click="resetCondition">再想一想</van-button>
-                            <van-button type="primary" @click="goUpBuyPage">去开通</van-button>
+                            <van-button type="primary" @click="goUpBuyPage(false)">去开通</van-button>
                         </div>
                     </div>
                 </div>

+ 21 - 5
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -469,7 +469,15 @@ var vEntSearchComponent = new Vue({
         }
       }
     },
-    goUpBuyPage () {
+    goUpBuyPage (originName) {
+      if (!originName) {
+        originName = '企业搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
+      }
+      try {
+        _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
+      } catch (e) {
+        console.log('未初始化百度统计')
+      }
       window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
     },
     getSearchParams () {
@@ -611,7 +619,7 @@ var vEntSearchComponent = new Vue({
           overlayClass: 'z-2030',
           confirmButtonText: '去升级',
         }).then(function () {
-          _this.goUpBuyPage()
+          _this.goUpBuyPage('标讯收藏满100条-去升级')
         }).catch(function () {});
         return
       }
@@ -984,7 +992,15 @@ var vMainSearchComponent = new Vue({
         }
       }
     },
-    goUpBuyPage () {
+    goUpBuyPage (originName) {
+      if (!originName) {
+        originName = '标讯搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
+      }
+      try {
+        _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
+      } catch (e) {
+        console.log('未初始化百度统计')
+      }
       window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
     },
     getSearchParams () {
@@ -1130,7 +1146,7 @@ var vMainSearchComponent = new Vue({
       }))
       SuperSearch.setSessionStorage()
       if(!this.checkNowPower()){
-        this.goUpBuyPage()
+        this.goUpBuyPage('标讯搜索企业画像-去升级')
       }else{
         var tempUrl = '/jyapp/big/page/ent_portrait?eId='
         if (utils.isWeiXinBrowser) {
@@ -1160,7 +1176,7 @@ var vMainSearchComponent = new Vue({
           overlayClass: 'z-2030',
           confirmButtonText: '去升级',
         }).then(function () {
-          _this.goUpBuyPage()
+          _this.goUpBuyPage('标讯收藏满100条-去升级')
         }).catch(function () {});
         return
       }

+ 3 - 3
src/web/templates/weixin/search/tabSearch.html

@@ -637,7 +637,7 @@
                                 </div>
                                 <div class="pop-bottom" v-if="isWaitBuy">
                                     <van-button type="default" @click="resetCondition">再想一想</van-button>
-                                    <van-button type="primary" @click="goUpBuyPage">去开通</van-button>
+                                    <van-button type="primary" @click="goUpBuyPage(false)">去开通</van-button>
                                 </div>
                             </div>
                         </div>
@@ -681,7 +681,7 @@
                                 <div class="img-empty"></div>
                                 <span>未搜索到符合条件的企业</span>
                             </div>
-                            <div class="up-button" @click="goUpBuyPage" style="min-height: 0.64rem" v-else-if="showUpTip">升级会员,查看更多搜索结果</div>
+                            <div class="up-button" @click="goUpBuyPage('企业搜索底部-去升级')" style="min-height: 0.64rem" v-else-if="showUpTip">升级会员,查看更多搜索结果</div>
                             <div class="ent-more-tip" v-if="false">
                                 <i class="j-icon base-icon icon-up-allow"></i>
                                 <span>上拉查看更多搜索结果</span>
@@ -777,7 +777,7 @@
                         </div>
                         <div class="pop-bottom" v-if="isWaitBuy">
                             <van-button type="default" @click="resetCondition">再想一想</van-button>
-                            <van-button type="primary" @click="goUpBuyPage">去开通</van-button>
+                            <van-button type="primary" @click="goUpBuyPage(false)">去开通</van-button>
                         </div>
                     </div>
                 </div>