Commit 3f28aaa1 authored by linwenqing's avatar linwenqing

feat:我的模块和证书模块用户触发事件埋点

parent 52645e9b
...@@ -211,14 +211,20 @@ export default { ...@@ -211,14 +211,20 @@ export default {
}) })
return return
} }
let param = { let params = {
personalCertNum: this.certId, personalCertNum: this.certId,
personalName: this.certName personalName: this.certName
} }
uni.showLoading({ uni.showLoading({
title: '查询中,请稍后', title: '查询中,请稍后',
}) })
this.$u.api.getCertFromOut(param).then((res) => { let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('selectCertByIdAndName', trackParams)
this.$u.api.getCertFromOut(params).then((res) => {
uni.hideLoading() uni.hideLoading()
if(!res){ if(!res){
this.$refs.uToast.show({ this.$refs.uToast.show({
......
...@@ -137,27 +137,32 @@ export default { ...@@ -137,27 +137,32 @@ export default {
}) })
return return
} }
this.$u.api let params = {
.updateUserInfo({ identityFrontPath: this.student.identityFrontPath,
identityFrontPath: this.student.identityFrontPath, identityBackPath: this.student.identityBackPath,
identityBackPath: this.student.identityBackPath, identityNumber: this.student.identityNumber,
identityNumber: this.student.identityNumber, certificateValidityDate: this.student.certificateValidityDate,
certificateValidityDate: this.student.certificateValidityDate, name: this.student.name,
name: this.student.name, }
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: '认证成功',
type: 'success',
duration: 2000,
}) })
.then((res) => { this.student.isCertify = true
this.$refs.uToast.show({ setTimeout(() => {
title: '认证成功', this.$u.route({
type: 'success', type: 'back',
duration: 2000,
}) })
this.student.isCertify = true }, 1500)
setTimeout(() => { })
this.$u.route({
type: 'back',
})
}, 1500)
})
}, },
getFront() { getFront() {
let that = this let that = this
...@@ -167,10 +172,17 @@ export default { ...@@ -167,10 +172,17 @@ export default {
uni.showLoading({ uni.showLoading({
title: '识别中,请稍后', title: '识别中,请稍后',
}) })
let params = {
url: process.uniEnv.qn_asset_url + res.key,
}
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('front', { .getCertifyInfoByType('front', params)
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
this.student.name = res.name this.student.name = res.name
...@@ -195,10 +207,17 @@ export default { ...@@ -195,10 +207,17 @@ export default {
uni.showLoading({ uni.showLoading({
title: '识别中,请稍后', title: '识别中,请稍后',
}) })
let params = {
url: process.uniEnv.qn_asset_url + res.key,
}
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('certFrontUpload', trackParams)
this.$u.api this.$u.api
.getCertifyInfoByType('back', { .getCertifyInfoByType('back', params)
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
this.student.certificateValidityDate = res.expire this.student.certificateValidityDate = res.expire
......
...@@ -49,23 +49,28 @@ export default { ...@@ -49,23 +49,28 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
this.$u.api let params = {
.updateUserInfo({ workUnit: this.student.workUnit,
workUnit: this.student.workUnit, }
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({
title: '保存成功',
type: 'success',
duration: 2000,
}) })
.then((res) => { setTimeout(() => {
this.isNotSet = false this.$u.route({
this.$refs.uToast.show({ type: 'back',
title: '保存成功',
type: 'success',
duration: 2000,
}) })
setTimeout(() => { }, 1500)
this.$u.route({ })
type: 'back',
})
}, 1500)
})
}, },
}, },
} }
......
...@@ -174,6 +174,12 @@ export default { ...@@ -174,6 +174,12 @@ export default {
}) })
return return
} }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('getPhonenumber', trackParams)
this.syncUserinfo(params) this.syncUserinfo(params)
}, },
syncUserinfo(params) { syncUserinfo(params) {
...@@ -241,23 +247,36 @@ export default { ...@@ -241,23 +247,36 @@ export default {
}) })
}, },
changeHead() { changeHead() {
//获取图片 //更换头像
upload.getPhoto(2, this.qiToken).then((res) => { upload.getPhoto(2, this.qiToken).then((res) => {
this.student.avatarPath = process.uniEnv.qn_asset_url + res.key this.student.avatarPath = process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ let params = {
avatarPath: this.student.avatarPath, avatarPath: this.student.avatarPath,
}) }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('changeAvatar', trackParams)
this.$u.api.updateUserInfo(params)
}) })
}, },
changeCertPhoto() { changeCertPhoto() {
//获取图片 //更换证件头像
upload.getPhoto(2, this.qiToken).then((res) => { upload.getPhoto(2, this.qiToken).then((res) => {
//显示
this.student.certificatePhotoPath = this.student.certificatePhotoPath =
process.uniEnv.qn_asset_url + res.key process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ let params = {
certificatePhotoPath: this.student.certificatePhotoPath, certificatePhotoPath: this.student.certificatePhotoPath,
}) }
let trackParams = {
openId: this.openId,
nickname: this.userInfo.nickName,
...params,
}
getApp().track('changeCertPhoto', trackParams)
this.$u.api.updateUserInfo(params)
}) })
}, },
toLogin() { toLogin() {
......
...@@ -27,6 +27,11 @@ export default { ...@@ -27,6 +27,11 @@ export default {
methods: { methods: {
upgrade: function() { upgrade: function() {
let that = this let that = this
let trackParams = {
openId: that.openId,
nickname: that.userInfo.nickName,
}
getApp().track('upgradeVersion', trackParams)
uni.showLoading({ uni.showLoading({
title: '正在更新版本...', title: '正在更新版本...',
}) })
...@@ -56,6 +61,11 @@ export default { ...@@ -56,6 +61,11 @@ export default {
content: '确认退出当前账号', content: '确认退出当前账号',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let trackParams = {
openId: that.openId,
nickname: that.userInfo.nickName,
}
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', {})
......
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