事件上报登录

This commit is contained in:
liuye
2023-05-18 11:57:18 +08:00
parent eaab46eb76
commit ee02cc8f73

View File

@@ -127,15 +127,13 @@ export default {
},
onLoad() {
this.autoLogin()
},
onShow() {
this.$nextTick(() => {
this.token && this.getUserInfo()
this.getDict()
this.form.phone = this.user.phone
this.form.name = this.user.realName || ''
})
if (!this.token) {
this.autoLogin().then(() => {
this.getUser()
})
} else {
this.getUser()
}
},
methods: {
@@ -230,6 +228,15 @@ export default {
},
handleSelectGrid(v) {
this.form.girdName = v.girdName
},
getUser() {
this.getUserInfo().then(() => {
this.getDict()
this.form.phone = this.user.phone
this.form.name = this.user.realName || ''
}).catch(() => {
this.$refs.login.show()
})
}
}
}