全局增加关于登录信息的扩展埋点

This commit is contained in:
aixianling
2022-08-26 17:20:08 +08:00
parent b70e270475
commit 2b50fdf5a4
3 changed files with 14 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ export default {
}
},
methods: {
...mapMutations(['setToken', 'setFinanceUser']),
...mapMutations(['setToken', 'getFinanceUser']),
...mapActions(['getUserInfo']),
getToken(params) {
if (params.access_token) {
@@ -62,9 +62,9 @@ export default {
},
created() {
wx = jWeixin
if (this.user.token) this.getUserInfo().then(() => {
if (this.user.token) this.getUserInfo().finally(() => {
if (/^\/project\/xiushan/.test(location.pathname)) {
this.setFinanceUser()
this.getFinanceUser()
}
})
}