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,15 +137,20 @@ export default { ...@@ -137,15 +137,20 @@ 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,
}) }
.then((res) => { 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({ this.$refs.uToast.show({
title: '认证成功', title: '认证成功',
type: 'success', type: 'success',
...@@ -167,10 +172,17 @@ export default { ...@@ -167,10 +172,17 @@ export default {
uni.showLoading({ uni.showLoading({
title: '识别中,请稍后', title: '识别中,请稍后',
}) })
this.$u.api let params = {
.getCertifyInfoByType('front', {
url: process.uniEnv.qn_asset_url + res.key, 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
.getCertifyInfoByType('front', params)
.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: '识别中,请稍后',
}) })
this.$u.api let params = {
.getCertifyInfoByType('back', {
url: process.uniEnv.qn_asset_url + res.key, 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
.getCertifyInfoByType('back', params)
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
this.student.certificateValidityDate = res.expire this.student.certificateValidityDate = res.expire
......
...@@ -49,11 +49,16 @@ export default { ...@@ -49,11 +49,16 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
this.$u.api let params = {
.updateUserInfo({
workUnit: this.student.workUnit, workUnit: this.student.workUnit,
}) }
.then((res) => { 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.isNotSet = false
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '保存成功', title: '保存成功',
......
...@@ -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