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