update埋点

This commit is contained in:
路 范
2021-09-17 11:35:29 +08:00
parent 0e6b6d7ffa
commit 2c1de9b107
2 changed files with 60 additions and 17 deletions

View File

@@ -287,14 +287,15 @@ export default {
idCard: "加载中...",
userName: "加载中...",
policiesRegulationsLists: {
totalCount: 0
}
}
totalCount: 0,
},
},
};
},
async created() {
this.onInit();
console.log("this", this);
this.setLocationAplus();
},
methods: {
// 获取数据
@@ -305,11 +306,11 @@ export default {
dataType: "JSON",
type: "POST",
data: {
// ticket: this.$route.query.ticket
ticket: "8a118a427bda7bed017bed084ec10622-ticket"
ticket: this.$route.query.ticket,
//ticket: "8a118a427bda7bed017bed084ec10622-ticket"
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
onSuccess: (data) => {
console.log("首页数据", data);
if (data.data && data.data.success == true) {
this.data = data.data.data;
@@ -325,16 +326,16 @@ export default {
} else console.log("用户无数据,不展示");
}
},
onFail: err => {
onFail: (err) => {
console.log("用户无数据,不展示");
}
},
});
},
// 跳转项目详情
gotoProject(type) {
this.$router.push({
name: "projectSelect",
params: { type: type, ticket: this.$route.query.ticket }
params: { type: type, ticket: this.$route.query.ticket },
});
},
onLoadStatistic() {
@@ -358,21 +359,58 @@ export default {
// 设置用户信息埋点
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_hold", "BLOCK"]
arguments: ["_hold", "BLOCK"],
});
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_nick", userName] // this.userInfoData.username],
arguments: ["_user_nick", userName], // this.userInfoData.username],
});
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_id", Userid]
arguments: ["_user_id", Userid],
});
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_hold", "START"]
arguments: ["_hold", "START"],
});
}
}
},
setLocationAplus() {
ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法");
ZWJSBridge.getUserType()
.then((result1) => {
console.log(result1);
//经纬度
ZWJSBridge.getLocation()
.then((result2) => {
console.log(result2);
debugger;
aplus_queue.push({
action: "aplus.sendPV",
arguments: [
{
is_auto: false,
},
{
isMini: true,
miniAppId: "2001833218", //'应用开发管理平台-应用 ID
miniAppName: "房屋征收",
long: result2.longitude,
lati: result2.latitude,
userType: result1.userType,
},
],
});
})
.catch((error) => {
console.log(error);
});
})
.catch((error) => {
console.log(error);
});
});
},
},
};
</script>