Commit 954b6642 authored by 和慭琛's avatar 和慭琛

bug fix

parent 3ad5a696
...@@ -190,6 +190,76 @@ ...@@ -190,6 +190,76 @@
getProtocolContent: function() { getProtocolContent: function() {
this.protocolContent this.protocolContent
}, },
/* ------------------------- 数据埋点begin ------------------------------ */
track(event, properties) {
if (AnalysysAgent) {
// 易观添加事件
let AnalysysAgent = wx.AnalysysAgent;
AnalysysAgent.track("take_order_" + event, properties);
}
},
identify(userInfo, openid, unionid = null) {
// 设备身份表示
if (AnalysysAgent) {
let setProfile = {
'openid': openid,
'unionid': unionid,
}
setProfile = Object.assign(setProfile, userInfo)
AnalysysAgent.profileSet(setProfile);
}
},
setUserId(userId) {
// 用户id设置
if (AnalysysAgent) {
AnalysysAgent.alias(userId + '')
}
},
setUser(user) {
// 用户附加属性
if (AnalysysAgent) {
let userInfo = {
'mobile':user.mobile,
'userfrom_id':user.uid,
'userfrom':'家维广场',
'avatar':user.avatar,
'nickname':user.nickname,
'username':user.username,
'wxhuid':user.wxhuid,
'id':user.id,
'money': user.money,
'score':user.score
};
Object.keys(userInfo).map(key=>{
if(key && userInfo[key]){
AnalysysAgent.profileAppend(key,userInfo[key])
}
})
}
},
share(toShareProperties, trackProperties) {
if (AnalysysAgent) {
AnalysysAgent.share(toShareProperties, trackProperties);
}
},
trackPage(pageName, properties){
if (AnalysysAgent) {
AnalysysAgent.pageView(pageName, properties);
}
},
initShare(option){
console.log(option,'option-initShare')
option = option || {}
if (AnalysysAgent && option.user_id) {
let shareUserInfo = {
'share_from_id':option.user_id || '',
'share_from_nickname':option.user_name || '',
}
AnalysysAgent.registerSuperProperties(shareUserInfo);
}
},
/* ------------------------- 数据埋点end ------------------------------ */
}, },
......
...@@ -7,7 +7,7 @@ let argo ={ ...@@ -7,7 +7,7 @@ let argo ={
1 开启调试模式,数据不入库。类型:Number。 1 开启调试模式,数据不入库。类型:Number。
2 开启调试模式,数据入库。类型:Number。 2 开启调试模式,数据入库。类型:Number。
*/ */
debugMode:0, debugMode:1,
autoTrack:true, autoTrack:true,
uploadURL: 'https://argo.banshouhui.com/' uploadURL: 'https://argo.banshouhui.com/'
} }
......
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('下单页')
//+ '?orderId=' + this.orderId + '&toWhere=detail' //+ '?orderId=' + this.orderId + '&toWhere=detail'
if(e && e.toWhere){ if(e && e.toWhere){
this.toWhere(e) this.toWhere(e)
......
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