事件上报登录

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