update埋点
This commit is contained in:
@@ -3,9 +3,13 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
|
<meta name="viewport"
|
||||||
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
|
||||||
<title>房屋征收</title>
|
<title>房屋征收</title>
|
||||||
<script type="text/javascript" src="https://d.alicdn.com/alilog/mlog/aplus.js?id=202951085"></script>
|
<script type="text/javascript" src="https://d.alicdn.com/alilog/mlog/aplus.js?id=202951085"></script>
|
||||||
|
<script type="text/javascript" src="//jssdk.yyhj.zjzwfw.gov.cn/jsbridge/v2.0.0/bridge.min.js"></script>
|
||||||
|
<!-- 引入ZWJSBridge -->
|
||||||
|
<script type="text/javascript" src="//assets.zjzwfw.gov.cn/assets/ZWJSBridge/1.0.1/zwjsbridge.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -13,7 +17,7 @@
|
|||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
<script>
|
<script>
|
||||||
// console.log("初始页面");
|
// console.log("初始页面");
|
||||||
(function(w, d, s, q, i) {
|
(function (w, d, s, q, i) {
|
||||||
w[q] = w[q] || [];
|
w[q] = w[q] || [];
|
||||||
var f = d.getElementsByTagName(s)[0];
|
var f = d.getElementsByTagName(s)[0];
|
||||||
var j = d.createElement(s);
|
var j = d.createElement(s);
|
||||||
@@ -46,6 +50,7 @@
|
|||||||
arguments: [{
|
arguments: [{
|
||||||
is_auto: false
|
is_auto: false
|
||||||
}, {
|
}, {
|
||||||
|
isMini: true,
|
||||||
miniAppId: "2001833218", //'应用开发管理平台-应用 ID
|
miniAppId: "2001833218", //'应用开发管理平台-应用 ID
|
||||||
miniAppName: "房屋征收"
|
miniAppName: "房屋征收"
|
||||||
}]
|
}]
|
||||||
|
|||||||
@@ -287,14 +287,15 @@ export default {
|
|||||||
idCard: "加载中...",
|
idCard: "加载中...",
|
||||||
userName: "加载中...",
|
userName: "加载中...",
|
||||||
policiesRegulationsLists: {
|
policiesRegulationsLists: {
|
||||||
totalCount: 0
|
totalCount: 0,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.onInit();
|
this.onInit();
|
||||||
console.log("this", this);
|
console.log("this", this);
|
||||||
|
this.setLocationAplus();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
@@ -305,11 +306,11 @@ export default {
|
|||||||
dataType: "JSON",
|
dataType: "JSON",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
// ticket: this.$route.query.ticket
|
ticket: this.$route.query.ticket,
|
||||||
ticket: "8a118a427bda7bed017bed084ec10622-ticket"
|
//ticket: "8a118a427bda7bed017bed084ec10622-ticket"
|
||||||
},
|
},
|
||||||
appKey: "es4b8zmz+2001833218+dehllx",
|
appKey: "es4b8zmz+2001833218+dehllx",
|
||||||
onSuccess: data => {
|
onSuccess: (data) => {
|
||||||
console.log("首页数据", data);
|
console.log("首页数据", data);
|
||||||
if (data.data && data.data.success == true) {
|
if (data.data && data.data.success == true) {
|
||||||
this.data = data.data.data;
|
this.data = data.data.data;
|
||||||
@@ -325,16 +326,16 @@ export default {
|
|||||||
} else console.log("用户无数据,不展示");
|
} else console.log("用户无数据,不展示");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onFail: err => {
|
onFail: (err) => {
|
||||||
console.log("用户无数据,不展示");
|
console.log("用户无数据,不展示");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转项目详情
|
// 跳转项目详情
|
||||||
gotoProject(type) {
|
gotoProject(type) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "projectSelect",
|
name: "projectSelect",
|
||||||
params: { type: type, ticket: this.$route.query.ticket }
|
params: { type: type, ticket: this.$route.query.ticket },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoadStatistic() {
|
onLoadStatistic() {
|
||||||
@@ -358,21 +359,58 @@ export default {
|
|||||||
// 设置用户信息埋点
|
// 设置用户信息埋点
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_hold", "BLOCK"]
|
arguments: ["_hold", "BLOCK"],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_user_nick", userName] // this.userInfoData.username],
|
arguments: ["_user_nick", userName], // this.userInfoData.username],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_user_id", Userid]
|
arguments: ["_user_id", Userid],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user