登录处理

This commit is contained in:
hongchao 2025-07-15 09:03:53 +08:00
parent d635eaa592
commit d8f3ae3424
1 changed files with 34 additions and 32 deletions

View File

@ -364,15 +364,16 @@ export default {
}) })
}, },
IsAdmin() { IsAdmin() {
this.loginForm.loginMethod = this.loginMethod this.handleLogin()
this.$store.dispatch('IsAdmin', this.loginForm).then(res => { // this.loginForm.loginMethod = this.loginMethod
if (res.data) { // this.$store.dispatch('IsAdmin', this.loginForm).then(res => {
this.isAdmin = res.data // if (res.data) {
this.$message.success('检测到您是超级管理账号,需进行手机检验') // this.isAdmin = res.data
} else { // this.$message.success(',')
this.handleLogin() // } else {
} // this.handleLogin()
}) // }
// })
}, },
isLogin() { isLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
@ -380,29 +381,30 @@ export default {
this.loading = true this.loading = true
let that = this let that = this
this.loginForm.loginMethod = this.loginMethod this.loginForm.loginMethod = this.loginMethod
this.$store
.dispatch('IsLogin', this.loginForm) // this.$store
.then(res => { // .dispatch('IsLogin', this.loginForm)
if (res.data) { // .then(res => {
this.$modal // if (res.data) {
.confirm('账号已在其他地方登录是否继续登录!!!!') // this.$modal
.then(function () { // .confirm('')
return that.handleLogin() // .then(function () {
}) // return that.handleLogin()
.then(() => { // })
this.loading = false // .then(() => {
}) // this.loading = false
.catch(() => { // })
this.loading = false // .catch(() => {
}) // this.loading = false
} else { // })
that.handleLogin() // } else {
} // that.handleLogin()
}) // }
.catch(() => { // })
this.loading = false // .catch(() => {
if (this.captchaEnabled) this.getCode() // this.loading = false
}) // if (this.captchaEnabled) this.getCode()
// })
} }
}) })
}, },