Commit b8fe6f90 authored by linwenqing's avatar linwenqing

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 24ea3df8 a4875794
......@@ -180,17 +180,7 @@ export default {
if (AnalysysAgent) {
AnalysysAgent.pageView(pageName, properties)
}
},
initShare(option) {
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 ------------------------------ */
},
}
......
......@@ -299,8 +299,13 @@ export default {
recordId: this.recordId,
source: this.source,
}
getApp().track("answer", params)
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params
}
getApp().track("answer", trackParams)
this.$u.api.getQuestionTotal(params).then((res) => {
// 列表总长度,一定要在第一次请求列表数据前明确该值
......@@ -547,7 +552,12 @@ export default {
recordId: this.recordId,
source: this.source,
}
getApp().track("submitAnswers", params)
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params
}
getApp().track("submitAnswers", trackParams)
this.$u.api.answer([params]).then((res) => {
if (this.source === 2) {
// 每日一练
......@@ -580,7 +590,12 @@ export default {
uni.showLoading({
title: '正在计算考试成绩',
})
getApp().track("handPaper", data)
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...data
}
getApp().track("handPaper", trackParams)
this.$u.api.submitExamRecord(data).then((res) => {
uni.hideLoading()
if (res) {
......@@ -631,7 +646,9 @@ export default {
const action = status ? 'removeCollection' : 'joinCollection'
getApp().track("collect", {
action: action,
questionId: info.id
questionId: info.id,
openId: this.openId,
nickname: this.userInfo.nickName,
})
this.$u.api[action]({ questionId: info.id }).then((res) => {
if (res) {
......@@ -661,7 +678,9 @@ export default {
remove() {
const info = this.list.find((v) => v.index === this.currentIndex)
getApp().track("removeError", {
questionId: info.id
questionId: info.id,
openId: this.openId,
nickname: this.userInfo.nickName,
})
this.$u.api.removeError({ questionId: info.id }).then((res) => {
if (res) this.init(this.currentIndex)
......
......@@ -185,10 +185,16 @@ export default {
},
},
onShareAppMessage(res) {
return {
let toShareProperties = {
title: '模考大师',
path: `/pages/learn/score?id=${this.id}`,
}
let trackProperties = {
openId: this.openId,
nickname: this.userInfo.nickName
}
getApp().share(toShareProperties, trackProperties)
return toShareProperties
},
onLoad(options) {
getApp().trackPage('考试成绩')
......
......@@ -100,8 +100,10 @@ export default {
getApp().track("search", {
questionWarehouseId: this.questionWarehouseId,
keyword: this.keyword,
openId: this.openId,
nickname: this.userInfo.nickName
})
this.loadStatus = 'loading'
this.$u.api.searchQuestion(data).then((res) => {
this.total = res.total
......
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