Commit 1949c9e6 authored by Facius's avatar Facius

fix: 去掉埋点;网页页面

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