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