Commit 702debc6 by 侯体倬

feat: 删除新华优选埋点,麦贝斯优化

parent 05e4365c
...@@ -63,6 +63,9 @@ export default { ...@@ -63,6 +63,9 @@ export default {
this.getStatus(); this.getStatus();
}, },
onShow() { onShow() {
if (["antgood", "SWQ"].indexOf(this.mixid) == -1) {
return;
}
// if (wx.getStorageSync('isThereALabelAgain')) { // if (wx.getStorageSync('isThereALabelAgain')) {
this.tagId = -1; this.tagId = -1;
this.getStatus(); this.getStatus();
......
...@@ -389,13 +389,6 @@ export default { ...@@ -389,13 +389,6 @@ export default {
title: '加入成功', title: '加入成功',
icon: 'success', icon: 'success',
}) })
// 新华优选埋点
if (app.trackEvent) {
app.trackEvent('resourceCartClick', {
resourceId: this.getProductInfos[0].productId,
resourceName: this.getProductInfos[0].pdtName
})
}
this.show = false; this.show = false;
} else { } else {
wx.showToast({ wx.showToast({
......
...@@ -29,7 +29,6 @@ import "@/utils/themeModule"; ...@@ -29,7 +29,6 @@ import "@/utils/themeModule";
import shop from "./api/shop"; import shop from "./api/shop";
import spokesman from "@/api/spokesman"; import spokesman from "@/api/spokesman";
import live from "@/api/live" import live from "@/api/live"
import xhyxTrack from '@/utils/xhyxShop.js'
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
...@@ -55,8 +54,6 @@ app.$mount() ...@@ -55,8 +54,6 @@ app.$mount()
// glob挂载到 // glob挂载到
let mpApp = getApp(); let mpApp = getApp();
// 新华优选埋点
xhyxTrack.init(mpApp);
Vue.prototype.mpApp = mpApp Vue.prototype.mpApp = mpApp
// 初始化 // 初始化
mpApp.fenxiaoModel = new fenxiaoModel({ mpApp.fenxiaoModel = new fenxiaoModel({
...@@ -225,11 +222,6 @@ wx.onAppRoute(res => { ...@@ -225,11 +222,6 @@ wx.onAppRoute(res => {
Store.commit("setShopUserInfo", res.data.data); Store.commit("setShopUserInfo", res.data.data);
wx.setStorageSync('loginUserInfo',res.data.data ? res.data.data : {}) wx.setStorageSync('loginUserInfo',res.data.data ? res.data.data : {})
userId = res.data.data ? res.data.data.userId : '' userId = res.data.data ? res.data.data.userId : ''
// 新华优选埋点
if (mpApp.trackLogin) {
const mobilePhone = res.data.data && res.data.data.mobilephone;
mpApp.trackLogin(mobilePhone);
}
} }
}) })
......
...@@ -184,10 +184,6 @@ export default { ...@@ -184,10 +184,6 @@ export default {
key: "openid", key: "openid",
data: res1.data.data data: res1.data.data
}); });
// 新华优选埋点
if (app.trackSetOpenid) {
app.trackSetOpenid(res1.data.data);
}
} }
this.params += '&open_id='+wx.getStorageSync("openid"); this.params += '&open_id='+wx.getStorageSync("openid");
this.withoutScene = true; this.withoutScene = true;
...@@ -324,10 +320,6 @@ export default { ...@@ -324,10 +320,6 @@ export default {
key: "openid", key: "openid",
data: res1.data.data data: res1.data.data
}); });
// 新华优选埋点
if (app.trackSetOpenid) {
app.trackSetOpenid(res1.data.data);
}
log.info('判断是否登录过=登陆过直接调用..未登录过需要授权头像昵称信息。') log.info('判断是否登录过=登陆过直接调用..未登录过需要授权头像昵称信息。')
if (wx.getStorageSync('sessionid')) { if (wx.getStorageSync('sessionid')) {
log.info('已登陆了') log.info('已登陆了')
......
...@@ -956,10 +956,6 @@ export default { ...@@ -956,10 +956,6 @@ export default {
key: "openid", key: "openid",
data: res1.data.data data: res1.data.data
}); });
// 新华优选埋点
if (app.trackSetOpenid) {
app.trackSetOpenid(res1.data.data);
}
} }
}) })
}, },
......
import compass from "mayi-front-tools/compass"
const TRACK_NAME = 'compass'
function trackSetOpenid(openid) {
compass.setOpenid(openid);
}
function trackEvent(eventName, payload) {
compass.track(eventName, payload);
}
function trackLogin(phoneNumber) {
compass.login(phoneNumber)
}
export default {
init(mpApp) {
if (!['xhyx_uat', 'xhyx_prod'].includes(process.env.NODE_ENV)) return;
if (!mpApp[TRACK_NAME]) {
// 配置初始化参数
compass.init({
name: 'compass',
server_url: 'https://track.hebeijiaoyu.cn/api/trackminimessage?productId=xinhuayouxuan',
// 全埋点控制开关
autoTrack:{
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
appHide: true, // 默认为 true,false 则关闭 $MPHide 事件采集
pageShow: true, // 默认为 true,false 则关闭 $MPViewScreen 事件采集
pageShare: true, // 默认为 true,false 则关闭 $MPShare 事件采集
mpClick: false, // 默认为 false,true 则开启 $MPClick 事件采集
mpFavorite: true, // 默认为 true,false 则关闭 $MPAddFavorites 事件采集
pageLeave: false // 默认为 false, true 则开启 $MPPageLeave事件采集
},
// 是否允许控制台打印查看埋点数据(建议开启查看)
show_log: true
});
mpApp[TRACK_NAME] = compass;
mpApp.trackSetOpenid = trackSetOpenid;
mpApp.trackEvent = trackEvent;
mpApp.trackLogin = trackLogin;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment