Commit 3f28aaa1 authored by linwenqing's avatar linwenqing

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

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