Commit 1949c9e6 authored by Facius's avatar Facius

fix: 去掉埋点;网页页面

parent 9dc0ff7e
<script> <script>
import './../.env.js' import './../.env.js'
import { AnalysysAgent } from '@/common/analysys_paas.js' // import { AnalysysAgent } from '@/common/analysys_paas.js'
export default { export default {
globalData: { globalData: {
// 开发环境 // 开发环境
...@@ -8,7 +8,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
questionList: [], questionList: [],
}, },
onLaunch: function(options) { onLaunch: function(options) {
AnalysysAgent.registerSuperProperty('platform', 'study') // AnalysysAgent.registerSuperProperty('platform', 'study')
// 版本更新 // 版本更新
this.updateApp() this.updateApp()
}, },
...@@ -134,53 +134,53 @@ export default { ...@@ -134,53 +134,53 @@ export default {
this.$u.vuex('answerCount', {}) this.$u.vuex('answerCount', {})
}, },
/* ------------------------- 数据埋点begin ------------------------------ */ /* ------------------------- 数据埋点begin ------------------------------ */
track(event, properties) { // track(event, properties) {
if (AnalysysAgent) { // if (AnalysysAgent) {
// 易观添加事件 // // 易观添加事件
let AnalysysAgent = wx.AnalysysAgent // let AnalysysAgent = wx.AnalysysAgent
AnalysysAgent.track('study_' + event, properties) // AnalysysAgent.track('study_' + event, properties)
} // }
}, // },
profileSet(vm) { // profileSet(vm) {
// 设备身份标识 // // 设备身份标识
if (AnalysysAgent) { // if (AnalysysAgent) {
let profile = vm.$u.deepClone(vm.userInfo) // let profile = vm.$u.deepClone(vm.userInfo)
profile.token = vm.vuex_token // profile.token = vm.vuex_token
profile.openId = vm.openId // profile.openId = vm.openId
profile.orgId = vm.orgId // profile.orgId = vm.orgId
AnalysysAgent.profileSet(profile) // AnalysysAgent.profileSet(profile)
} // }
}, // },
profileAppend(vm) { // profileAppend(vm) {
if (AnalysysAgent) { // if (AnalysysAgent) {
let user = vm.$u.deepClone(vm.userInfo) // let user = vm.$u.deepClone(vm.userInfo)
user.token = vm.vuex_token // user.token = vm.vuex_token
user.openId = vm.openId // user.openId = vm.openId
// 用户id设置 // // 用户id设置
AnalysysAgent.alias(user.openid + '') // AnalysysAgent.alias(user.openid + '')
// 用户附加属性 // // 用户附加属性
let profile = { // let profile = {
userfrom: '模考大师', // userfrom: '模考大师',
openId: user.openid, // openId: user.openid,
nickName: user.nickName // nickName: user.nickName
} // }
Object.keys(profile).map((key) => { // Object.keys(profile).map((key) => {
if (key && profile[key]) { // if (key && profile[key]) {
AnalysysAgent.profileAppend(key, profile[key]) // AnalysysAgent.profileAppend(key, profile[key])
} // }
}) // })
} // }
}, // },
share(toShareProperties, trackProperties) { // share(toShareProperties, trackProperties) {
if (AnalysysAgent) { // if (AnalysysAgent) {
AnalysysAgent.share(toShareProperties, trackProperties) // AnalysysAgent.share(toShareProperties, trackProperties)
} // }
}, // },
trackPage(pageName, properties) { // trackPage(pageName, properties) {
if (AnalysysAgent) { // if (AnalysysAgent) {
AnalysysAgent.pageView(pageName, properties) // AnalysysAgent.pageView(pageName, properties)
} // }
} // }
/* ------------------------- 数据埋点end ------------------------------ */ /* ------------------------- 数据埋点end ------------------------------ */
}, },
} }
......
...@@ -93,6 +93,20 @@ ...@@ -93,6 +93,20 @@
} }
] ]
}, },
{
"root": "pages/web",
"pages": [
{
"path": "index",
"name": "webview",
"style": {
"navigationBarTitleText": "网页",
"navigationStyle": "custom",
"disableScroll": true
}
}
]
},
{ {
"root": "pages/learn", "root": "pages/learn",
"pages": [ "pages": [
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('问卷调查') // getApp().trackPage('问卷调查')
if (e && e.surveyId) { if (e && e.surveyId) {
this.surveyId = e.surveyId this.surveyId = e.surveyId
} }
...@@ -138,12 +138,12 @@ export default { ...@@ -138,12 +138,12 @@ export default {
methods: { methods: {
queryQuestionWarehouseById(id) { queryQuestionWarehouseById(id) {
// 埋点-调查问卷信息信息 // 埋点-调查问卷信息信息
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
id: id, // id: id,
} // }
getApp().track('queryQuestionWarehouseById-DetailPage', trackParams) // getApp().track('queryQuestionWarehouseById-DetailPage', trackParams)
this.$u.api this.$u.api
.queryQuestionWarehouseById(id) .queryQuestionWarehouseById(id)
...@@ -187,12 +187,12 @@ export default { ...@@ -187,12 +187,12 @@ export default {
surveyId: this.surveyId, // 问卷id surveyId: this.surveyId, // 问卷id
surveyName: "调查小问卷" surveyName: "调查小问卷"
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...options // ...options
} // }
getApp().track("submitSurvey", trackParams) // getApp().track("submitSurvey", trackParams)
this.$u.api this.$u.api
.submitSurvey(params) .submitSurvey(params)
.then((res) => { .then((res) => {
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('问卷结束-领取奖励') // getApp().trackPage('问卷结束-领取奖励')
if (e && e.surveyId) { if (e && e.surveyId) {
this.surveyId = e.surveyId this.surveyId = e.surveyId
} }
...@@ -111,12 +111,12 @@ export default { ...@@ -111,12 +111,12 @@ export default {
bizId: this.surveyId, // 问卷id bizId: this.surveyId, // 问卷id
institutionId: this.institutionData.id // 机构id institutionId: this.institutionData.id // 机构id
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params // ...params
} // }
getApp().track("receiveAward", trackParams) // getApp().track("receiveAward", trackParams)
this.$u.api this.$u.api
.receiveAward(params) .receiveAward(params)
.then((res) => { .then((res) => {
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
} }
}, },
onLoad: function() { onLoad: function() {
getApp().trackPage('证书详情') // getApp().trackPage('证书详情')
this.formatDataByType() this.formatDataByType()
}, },
computed: { computed: {
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
} }
}, },
onLoad(){ onLoad(){
getApp().trackPage('我的证书详情') // getApp().trackPage('我的证书详情')
}, },
onShow: function() { onShow: function() {
this.formatDataByType() this.formatDataByType()
......
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
getApp().trackPage('证书查询') // getApp().trackPage('证书查询')
this.checkType = '特种作业操作证查询' this.checkType = '特种作业操作证查询'
}, },
onShow: function(param) { onShow: function(param) {
...@@ -223,12 +223,12 @@ export default { ...@@ -223,12 +223,12 @@ export default {
uni.showLoading({ uni.showLoading({
title: '查询中,请稍后', title: '查询中,请稍后',
}) })
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('selectCertByIdAndName', trackParams) // getApp().track('selectCertByIdAndName', trackParams)
this.$u.api.getCertFromOut(params).then((res) => { this.$u.api.getCertFromOut(params).then((res) => {
uni.hideLoading() uni.hideLoading()
if(!res){ if(!res){
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
tapCount: 0, // 点击底部logo五次,显示机构id tapCount: 0, // 点击底部logo五次,显示机构id
showOrgId: false, // 显示机构id showOrgId: false, // 显示机构id
tipTop: 410, tipTop: 410,
tipTop0: 50, tipTop0: 128,
havingExamination: false, // 有进行中的考试 havingExamination: false, // 有进行中的考试
questionnaireStatus: 10, questionnaireStatus: 10,
} }
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
}, },
}, },
onLoad() { onLoad() {
getApp().trackPage('首页') // getApp().trackPage('首页')
if (this.vuex_token) { if (this.vuex_token) {
this.loading = true this.loading = true
// this.getProvinceList() // this.getProvinceList()
...@@ -642,7 +642,7 @@ export default { ...@@ -642,7 +642,7 @@ export default {
setTimeout(() => { setTimeout(() => {
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
this.tipTop0 = res.statusBarHeight * 2 + 70 this.tipTop0 = res.statusBarHeight * 2 + 88
this.showMask = true this.showMask = true
}, },
}) })
......
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
}, },
}, },
onLoad() { onLoad() {
getApp().trackPage('我的') // getApp().trackPage('我的')
}, },
onShow() { onShow() {
if (this.userInfo.nickName) { if (this.userInfo.nickName) {
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('选择题库') // getApp().trackPage('选择题库')
this.getPageInfo() this.getPageInfo()
}, },
methods: { methods: {
......
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
this.title = '错题记录' this.title = '错题记录'
} }
getApp().trackPage(this.title) // getApp().trackPage(this.title)
this.init() this.init()
}, },
methods: { methods: {
...@@ -308,12 +308,12 @@ export default { ...@@ -308,12 +308,12 @@ export default {
source: this.source, source: this.source,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params // ...params
} // }
getApp().track("answer", trackParams) // getApp().track("answer", trackParams)
this.$u.api.getQuestionTotal(params).then((res) => { this.$u.api.getQuestionTotal(params).then((res) => {
// 列表总长度,一定要在第一次请求列表数据前明确该值 // 列表总长度,一定要在第一次请求列表数据前明确该值
...@@ -382,7 +382,7 @@ export default { ...@@ -382,7 +382,7 @@ export default {
}, },
// 返回 // 返回
customBack() { customBack() {
getApp().track("back") // getApp().track("back")
if (this.source === 3) { if (this.source === 3) {
// 如果已答题,点击返回提示暂停弹窗 // 如果已答题,点击返回提示暂停弹窗
const count = this.list.reduce((accumulator, currentValue) => { const count = this.list.reduce((accumulator, currentValue) => {
...@@ -583,12 +583,12 @@ export default { ...@@ -583,12 +583,12 @@ export default {
params.remainderSecond = this.$refs.uCountDown.seconds params.remainderSecond = this.$refs.uCountDown.seconds
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track("submitAnswers", trackParams) // 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) {
// 每日一练 // 每日一练
...@@ -624,12 +624,12 @@ export default { ...@@ -624,12 +624,12 @@ export default {
id: this.recordId, id: this.recordId,
remainderSecond: this.$refs.uCountDown.seconds, remainderSecond: this.$refs.uCountDown.seconds,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...data // ...data
} // }
getApp().track("examSuspend", trackParams) // getApp().track("examSuspend", trackParams)
this.$u.api this.$u.api
.examSuspend(data) .examSuspend(data)
.then((res) => { .then((res) => {
...@@ -649,12 +649,12 @@ export default { ...@@ -649,12 +649,12 @@ export default {
uni.showLoading({ uni.showLoading({
title: '重新加载', title: '重新加载',
}) })
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...data // ...data
} // }
getApp().track("examCancel", trackParams) // getApp().track("examCancel", trackParams)
this.$u.api.examCancel(data).then((res) => { this.$u.api.examCancel(data).then((res) => {
uni.hideLoading() uni.hideLoading()
if (res) { if (res) {
...@@ -681,12 +681,12 @@ export default { ...@@ -681,12 +681,12 @@ export default {
uni.showLoading({ uni.showLoading({
title: '正在计算考试成绩', title: '正在计算考试成绩',
}) })
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...data // ...data
} // }
getApp().track("handPaper", trackParams) // 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) {
...@@ -735,12 +735,12 @@ export default { ...@@ -735,12 +735,12 @@ export default {
const info = this.list.find((v) => v.index === this.currentIndex) const info = this.list.find((v) => v.index === this.currentIndex)
const status = info ? info.collectionFlag : false const status = info ? info.collectionFlag : false
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, // openId: this.openId,
nickname: this.userInfo.nickName, // 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) {
const msg = status ? '取消收藏成功' : '收藏成功' const msg = status ? '取消收藏成功' : '收藏成功'
...@@ -768,11 +768,11 @@ export default { ...@@ -768,11 +768,11 @@ 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, // openId: this.openId,
nickname: this.userInfo.nickName, // 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)
}) })
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
}, },
onLoad() { onLoad() {
getApp().trackPage('模拟考试开始') // getApp().trackPage('模拟考试开始')
this.init() this.init()
}, },
methods: { methods: {
...@@ -90,12 +90,12 @@ export default { ...@@ -90,12 +90,12 @@ export default {
title: '加载中', title: '加载中',
}) })
// 埋点-模拟考试页面获取信息 // 埋点-模拟考试页面获取信息
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
questionWarehouseId: this.questionWarehouseId, // questionWarehouseId: this.questionWarehouseId,
} // }
getApp().track('getExamPaper-beginAnswerPage', trackParams) // getApp().track('getExamPaper-beginAnswerPage', trackParams)
this.$u.api this.$u.api
.getExamPaper({ questionWarehouseId: this.questionWarehouseId }) .getExamPaper({ questionWarehouseId: this.questionWarehouseId })
...@@ -123,12 +123,12 @@ export default { ...@@ -123,12 +123,12 @@ export default {
title: '载入试题中', title: '载入试题中',
}) })
// 埋点-去模拟考试 // 埋点-去模拟考试
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('applyExam-beginAnswerPage', trackParams) // getApp().track('applyExam-beginAnswerPage', trackParams)
this.$u.api.applyExam(params).then((res) => { this.$u.api.applyExam(params).then((res) => {
uni.hideLoading() uni.hideLoading()
......
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
// if (e && e.relationId) { // if (e && e.relationId) {
// this.relationId = e.relationId // this.relationId = e.relationId
// } // }
getApp().trackPage('绑定题库') // getApp().trackPage('绑定题库')
if (e && e.realPrice) { if (e && e.realPrice) {
this.realPrice = e.realPrice this.realPrice = e.realPrice
} }
...@@ -95,11 +95,11 @@ export default { ...@@ -95,11 +95,11 @@ export default {
methods: { methods: {
handleClick() { handleClick() {
// 埋点-扫码 // 埋点-扫码
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
} // }
getApp().track('scanCode-boundQuestionsPage', trackParams) // getApp().track('scanCode-boundQuestionsPage', trackParams)
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
...@@ -148,12 +148,12 @@ export default { ...@@ -148,12 +148,12 @@ export default {
title: '加载中', title: '加载中',
}) })
// 埋点-购买 // 埋点-购买
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...data, // ...data,
} // }
getApp().track('payOrder-boundQuestionsPage', trackParams) // getApp().track('payOrder-boundQuestionsPage', trackParams)
this.$u.api.payOrder(data).then((res) => { this.$u.api.payOrder(data).then((res) => {
uni.hideLoading() uni.hideLoading()
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('绑定试题') // getApp().trackPage('绑定试题')
if (e && e.code) { if (e && e.code) {
var code = e.code var code = e.code
this.param.cardNumber = code.slice(0, 14) this.param.cardNumber = code.slice(0, 14)
...@@ -75,11 +75,11 @@ export default { ...@@ -75,11 +75,11 @@ export default {
handleClick() { handleClick() {
this.loading = true this.loading = true
// 埋点-绑卡 // 埋点-绑卡
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
} // }
getApp().track('bindCard-boundTestPage', trackParams) // getApp().track('bindCard-boundTestPage', trackParams)
this.$u.api this.$u.api
.bindCard(this.param) .bindCard(this.param)
......
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
// if (e && e.relationId) { // if (e && e.relationId) {
// this.relationId = e.relationId // this.relationId = e.relationId
// } // }
getApp().trackPage('题库详情') // getApp().trackPage('题库详情')
if ((e && e.id) || this.questionWarehouseId) { if ((e && e.id) || this.questionWarehouseId) {
this.queryQuestionWarehouseById((e && e.id) || this.questionWarehouseId) this.queryQuestionWarehouseById((e && e.id) || this.questionWarehouseId)
} }
...@@ -204,12 +204,12 @@ export default { ...@@ -204,12 +204,12 @@ export default {
methods: { methods: {
queryQuestionWarehouseById(id) { queryQuestionWarehouseById(id) {
// 埋点-获取题库信息 // 埋点-获取题库信息
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
id: id, // id: id,
} // }
getApp().track('queryQuestionWarehouseById-DetailPage', trackParams) // getApp().track('queryQuestionWarehouseById-DetailPage', trackParams)
this.$u.api this.$u.api
.queryQuestionWarehouseById(id) .queryQuestionWarehouseById(id)
...@@ -248,12 +248,12 @@ export default { ...@@ -248,12 +248,12 @@ export default {
title: '加载中', title: '加载中',
}) })
// 埋点-购买 // 埋点-购买
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...data, // ...data,
} // }
getApp().track('payOrder-DetailPage', trackParams) // getApp().track('payOrder-DetailPage', trackParams)
this.$u.api.payOrder(data).then((res) => { this.$u.api.payOrder(data).then((res) => {
uni.hideLoading() uni.hideLoading()
......
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('科目设置') // getApp().trackPage('科目设置')
this.getPageInfo() this.getPageInfo()
this.getLocation() this.getLocation()
this.getProvinceList(this.category.id) this.getProvinceList(this.category.id)
...@@ -211,12 +211,12 @@ export default { ...@@ -211,12 +211,12 @@ export default {
// 获取省份列表 // 获取省份列表
async getProvinceList(id) { async getProvinceList(id) {
// 埋点-获取省份 // 埋点-获取省份
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
id: id, // id: id,
} // }
getApp().track('getProvinceList-examSettingPage', trackParams) // getApp().track('getProvinceList-examSettingPage', trackParams)
let res = await this.$u.api.getProvinceList(id) let res = await this.$u.api.getProvinceList(id)
console.log(res) console.log(res)
...@@ -244,12 +244,12 @@ export default { ...@@ -244,12 +244,12 @@ export default {
type: this.selectedTypeId, type: this.selectedTypeId,
} }
// 埋点-获取题库信息 // 埋点-获取题库信息
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...param, // ...param,
} // }
getApp().track('getQuestionWarehouse-examSettingPage', trackParams) // getApp().track('getQuestionWarehouse-examSettingPage', trackParams)
// 获取科目对应的题库 // 获取科目对应的题库
this.$u.api this.$u.api
...@@ -259,12 +259,12 @@ export default { ...@@ -259,12 +259,12 @@ export default {
let data = res[0] let data = res[0]
// 埋点-添加题库 // 埋点-添加题库
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
questionWarehouseId: data.id, // questionWarehouseId: data.id,
} // }
getApp().track('addQuestionWarehouse-examSettingPage', trackParams) // getApp().track('addQuestionWarehouse-examSettingPage', trackParams)
// 学员增加自己的题库 // 学员增加自己的题库
this.$u.api this.$u.api
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('手动绑定') // getApp().trackPage('手动绑定')
// if (e && e.relationId) { // if (e && e.relationId) {
// this.relationId = e.relationId // this.relationId = e.relationId
// } // }
...@@ -131,14 +131,14 @@ export default { ...@@ -131,14 +131,14 @@ export default {
this.loading = true this.loading = true
// 埋点-手动绑卡 // 埋点-手动绑卡
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
cardNumber: this.code, // cardNumber: this.code,
cardSecret: this.password, // cardSecret: this.password,
questionWarehouseId: this.relationId, // questionWarehouseId: this.relationId,
} // }
getApp().track('bindCard-manualBindingPage', trackParams) // getApp().track('bindCard-manualBindingPage', trackParams)
this.$u.api this.$u.api
.bindCard({ .bindCard({
......
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('每日一练') // getApp().trackPage('每日一练')
if (e && e.key) { if (e && e.key) {
this.$nextTick(() => { this.$nextTick(() => {
// setTimeout(() => { // setTimeout(() => {
...@@ -238,13 +238,13 @@ export default { ...@@ -238,13 +238,13 @@ export default {
} }
// 埋点-每日一练统计 // 埋点-每日一练统计
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
id: this.questionWarehouseId, // id: this.questionWarehouseId,
...params, // ...params,
} // }
getApp().track('everyTaskList-recordPage', trackParams) // getApp().track('everyTaskList-recordPage', trackParams)
this.$u.api this.$u.api
.everyTaskList(this.questionWarehouseId, params) .everyTaskList(this.questionWarehouseId, params)
...@@ -263,12 +263,12 @@ export default { ...@@ -263,12 +263,12 @@ export default {
// 练习分析 // 练习分析
studyRecord(params) { studyRecord(params) {
// 埋点-练习分析 // 埋点-练习分析
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('studyRecord-recordPage', trackParams) // getApp().track('studyRecord-recordPage', trackParams)
this.$u.api this.$u.api
.studyRecord(this.questionWarehouseId, params) .studyRecord(this.questionWarehouseId, params)
...@@ -301,12 +301,12 @@ export default { ...@@ -301,12 +301,12 @@ export default {
} }
// 埋点-模考记录 // 埋点-模考记录
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...this.recordParams, // ...this.recordParams,
} // }
getApp().track('queryExamRecord-recordPage', trackParams) // getApp().track('queryExamRecord-recordPage', trackParams)
this.$u.api this.$u.api
.queryExamRecord(this.recordParams) .queryExamRecord(this.recordParams)
......
...@@ -197,15 +197,15 @@ export default { ...@@ -197,15 +197,15 @@ export default {
title: '模考大师', title: '模考大师',
path: `/pages/learn/score?id=${this.id}`, path: `/pages/learn/score?id=${this.id}`,
} }
let trackProperties = { // let trackProperties = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
} // }
getApp().share(toShareProperties, trackProperties) // getApp().share(toShareProperties, trackProperties)
return toShareProperties return toShareProperties
}, },
onLoad(options) { onLoad(options) {
getApp().trackPage('考试成绩') // getApp().trackPage('考试成绩')
if (options) { if (options) {
this.id = options.id this.id = options.id
} else { } else {
......
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('题库选择') // getApp().trackPage('题库选择')
this.loadLabel() // 获取标签 this.loadLabel() // 获取标签
}, },
methods: { methods: {
...@@ -152,11 +152,11 @@ export default { ...@@ -152,11 +152,11 @@ export default {
let param = {} let param = {}
// 埋点-获取科目列表 // 埋点-获取科目列表
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
} // }
getApp().track('subjectList-selectCategoryPage', trackParams) // getApp().track('subjectList-selectCategoryPage', trackParams)
let res = await this.$u.api.subjectList(param) let res = await this.$u.api.subjectList(param)
this.tapLoading = false this.tapLoading = false
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('已选题库列表') // getApp().trackPage('已选题库列表')
this.getPageInfo() this.getPageInfo()
}, },
methods: { methods: {
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('已选题库') // getApp().trackPage('已选题库')
this.loadList() // 获取已选题库列表 this.loadList() // 获取已选题库列表
}, },
methods: { methods: {
...@@ -91,11 +91,11 @@ export default { ...@@ -91,11 +91,11 @@ export default {
let param = {} let param = {}
// 埋点-获取已选题库列表 // 埋点-获取已选题库列表
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
} // }
getApp().track('getMyQuestionWarehouseList-selectedList', trackParams) // getApp().track('getMyQuestionWarehouseList-selectedList', trackParams)
this.$u.api this.$u.api
.getMyQuestionWarehouseList(param) .getMyQuestionWarehouseList(param)
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('绑定试题') // getApp().trackPage('绑定试题')
if (e & e.result) { if (e & e.result) {
this.computed = e.result this.computed = e.result
} }
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
}, },
onLoad(params) { onLoad(params) {
getApp().trackPage('登录') // getApp().trackPage('登录')
if (params && params.path) { if (params && params.path) {
this.returnUrl = decodeURIComponent(params.path) this.returnUrl = decodeURIComponent(params.path)
} }
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
getApp().trackPage('我的题库') // getApp().trackPage('我的题库')
this.getUserQuestionWareHouseList() this.getUserQuestionWareHouseList()
}, },
methods: { methods: {
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
}, },
}, },
onLoad() { onLoad() {
getApp().trackPage('实名认证') // getApp().trackPage('实名认证')
this.student = getApp().globalData.student this.student = getApp().globalData.student
this.qiToken = getApp().globalData.qiNiuToken this.qiToken = getApp().globalData.qiNiuToken
}, },
...@@ -144,12 +144,12 @@ export default { ...@@ -144,12 +144,12 @@ export default {
certificateValidityDate: this.student.certificateValidityDate, certificateValidityDate: this.student.certificateValidityDate,
name: this.student.name, name: this.student.name,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('vertifyIdCard', trackParams) // getApp().track('vertifyIdCard', trackParams)
this.$u.api.updateUserInfo(params).then((res) => { this.$u.api.updateUserInfo(params).then((res) => {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '认证成功', title: '认证成功',
...@@ -175,12 +175,12 @@ export default { ...@@ -175,12 +175,12 @@ export default {
let params = { let params = {
url: process.uniEnv.qn_asset_url + res.key, url: process.uniEnv.qn_asset_url + res.key,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('certFrontUpload', trackParams) // getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('front', params) .getCertifyInfoByType('front', params)
.then((res) => { .then((res) => {
...@@ -210,12 +210,12 @@ export default { ...@@ -210,12 +210,12 @@ export default {
let params = { let params = {
url: process.uniEnv.qn_asset_url + res.key, url: process.uniEnv.qn_asset_url + res.key,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('certFrontUpload', trackParams) // getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('back', params) .getCertifyInfoByType('back', params)
.then((res) => { .then((res) => {
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
}, },
computed: {}, computed: {},
onLoad() { onLoad() {
getApp().trackPage('工作单位') // getApp().trackPage('工作单位')
this.student = getApp().globalData.student this.student = getApp().globalData.student
if (this.student.workUnit == '' || !this.student.workUnit) { if (this.student.workUnit == '' || !this.student.workUnit) {
this.isNotSet = true this.isNotSet = true
...@@ -52,12 +52,12 @@ export default { ...@@ -52,12 +52,12 @@ export default {
let params = { let params = {
workUnit: this.student.workUnit, workUnit: this.student.workUnit,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('changeCompany', trackParams) // getApp().track('changeCompany', trackParams)
this.$u.api.updateUserInfo(params).then((res) => { this.$u.api.updateUserInfo(params).then((res) => {
this.isNotSet = false this.isNotSet = false
this.$refs.uToast.show({ this.$refs.uToast.show({
......
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
getApp().trackPage('联系客服') // getApp().trackPage('联系客服')
} }
} }
</script> </script>
......
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
}) })
getApp().trackPage('我的信息') // getApp().trackPage('我的信息')
this.$u.api.getQiNiuToken({ bucketName: 'wsy-exam' }).then((res) => { this.$u.api.getQiNiuToken({ bucketName: 'wsy-exam' }).then((res) => {
this.qiToken = res this.qiToken = res
getApp().globalData.qiNiuToken = res getApp().globalData.qiNiuToken = res
...@@ -185,12 +185,12 @@ export default { ...@@ -185,12 +185,12 @@ export default {
}) })
return return
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('getPhonenumber', trackParams) // getApp().track('getPhonenumber', trackParams)
this.syncUserinfo(params) this.syncUserinfo(params)
}, },
syncUserinfo(params) { syncUserinfo(params) {
...@@ -265,12 +265,12 @@ export default { ...@@ -265,12 +265,12 @@ export default {
let params = { let params = {
avatarPath: this.student.avatarPath, avatarPath: this.student.avatarPath,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('changeAvatar', trackParams) // getApp().track('changeAvatar', trackParams)
this.inUpload() this.inUpload()
this.$u.api.updateUserInfo(params).then(() => { this.$u.api.updateUserInfo(params).then(() => {
uni.hideLoading() uni.hideLoading()
...@@ -285,12 +285,12 @@ export default { ...@@ -285,12 +285,12 @@ export default {
let params = { let params = {
certificatePhotoPath: this.student.certificatePhotoPath, certificatePhotoPath: this.student.certificatePhotoPath,
} }
let trackParams = { // let trackParams = {
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName, // nickname: this.userInfo.nickName,
...params, // ...params,
} // }
getApp().track('changeCertPhoto', trackParams) // getApp().track('changeCertPhoto', trackParams)
this.inUpload() this.inUpload()
this.$u.api.updateUserInfo(params).then(() => { this.$u.api.updateUserInfo(params).then(() => {
uni.hideLoading() uni.hideLoading()
......
...@@ -22,16 +22,16 @@ export default { ...@@ -22,16 +22,16 @@ export default {
}, },
computed: {}, computed: {},
onLoad() { onLoad() {
getApp().trackPage('设置') // getApp().trackPage('设置')
}, },
methods: { methods: {
upgrade: function() { upgrade: function() {
let that = this let that = this
let trackParams = { // let trackParams = {
openId: that.openId, // openId: that.openId,
nickname: that.userInfo.nickName, // nickname: that.userInfo.nickName,
} // }
getApp().track('upgradeVersion', trackParams) // getApp().track('upgradeVersion', trackParams)
uni.showLoading({ uni.showLoading({
title: '正在更新版本...', title: '正在更新版本...',
}) })
...@@ -61,11 +61,11 @@ export default { ...@@ -61,11 +61,11 @@ export default {
content: '确认退出当前账号', content: '确认退出当前账号',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let trackParams = { // let trackParams = {
openId: that.openId, // openId: that.openId,
nickname: that.userInfo.nickName, // nickname: that.userInfo.nickName,
} // }
getApp().track('logout', trackParams) // getApp().track('logout', trackParams)
that.$u.vuex('vuex_token', '') that.$u.vuex('vuex_token', '')
that.$u.vuex('openId', '') that.$u.vuex('openId', '')
that.$u.vuex('userInfo', {}) that.$u.vuex('userInfo', {})
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
} }
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('搜索结果') // getApp().trackPage('搜索结果')
this.keyword = e ? decodeURIComponent(e.keyword) : '' this.keyword = e ? decodeURIComponent(e.keyword) : ''
setList([]) setList([])
this.lists = getList() this.lists = getList()
...@@ -97,12 +97,12 @@ export default { ...@@ -97,12 +97,12 @@ export default {
size: this.pageSize, size: this.pageSize,
} }
getApp().track("search", { // getApp().track("search", {
questionWarehouseId: this.questionWarehouseId, // questionWarehouseId: this.questionWarehouseId,
keyword: this.keyword, // keyword: this.keyword,
openId: this.openId, // openId: this.openId,
nickname: this.userInfo.nickName // nickname: this.userInfo.nickName
}) // })
this.loadStatus = 'loading' this.loadStatus = 'loading'
this.$u.api.searchQuestion(data).then((res) => { this.$u.api.searchQuestion(data).then((res) => {
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
getApp().trackPage('搜索') // getApp().trackPage('搜索')
}, },
methods: { methods: {
search(val) { search(val) {
......
<template>
<view>
<!-- <web-view ref="webview" :webview-styles="webviewStyles" src="https://uniapp.dcloud.io/static/web-view.html"></web-view> -->
<web-view ref="webview" :webview-styles="webviewStyles" class="webview" @onPostMessage="handlePostMessage" :src="url"></web-view>
<!-- <button ref="uToast" class="button" @click="evalJs">evalJs(改变webview背景颜色)</button> -->
<!-- <view> -->
<!-- <u-toast ref="uToast" />
<u-button ref="aBc" /> -->
<!-- </view> -->
</view>
</template>
<script>
import uButton from '../../uview-ui/components/u-button/u-button.vue'
export default {
components: { uButton },
data() {
return {
url: '',
webviewStyles: {
progress: {
color: '#FFFF00'
}
}
}
},
onLoad(e) {
console.log('---------------')
if (e && decodeURIComponent(e.url)) {
this.url = decodeURIComponent(e.url)
console.log('bbbb:', this.url, decodeURIComponent(e.url))
}
if (e && decodeURIComponent(e.title)) {
uni.setNavigationBarTitle({
title: decodeURIComponent(e.title)
});
}
console.log('aaaaa:', this.url)
setTimeout(() => {
this.evalJs()
}, 3000);
},
onShareAppMessage(options) {
console.log(options.webViewUrl)
},
methods: {
// webview向外部发送消息
handlePostMessage: function(data) {
console.log("接收到消息:" + JSON.stringify(data.detail));
},
// 调用 webview 内部逻辑
evalJs() {
console.log('abc:', this.$refs.aBc)
// this.$refs.webview.evalJs("document.body.style.background ='#FFFF00'");
}
}
}
</script>
\ No newline at end of file
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