mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Modified login logic
This commit is contained in:
@@ -103,6 +103,11 @@ export default {
|
|||||||
this.captchaSrc = getCaptchaSrc()
|
this.captchaSrc = getCaptchaSrc()
|
||||||
},
|
},
|
||||||
login() {
|
login() {
|
||||||
|
if (this.loggingIn) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loggingIn = true
|
||||||
|
|
||||||
const _this = this
|
const _this = this
|
||||||
if (!this.userName) {
|
if (!this.userName) {
|
||||||
ElMessage.error({
|
ElMessage.error({
|
||||||
@@ -140,7 +145,6 @@ export default {
|
|||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
message: '<strong>登录成功</strong>'
|
message: '<strong>登录成功</strong>'
|
||||||
})
|
})
|
||||||
this.loggingIn = true
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
_this.$router.push('/')
|
_this.$router.push('/')
|
||||||
}, 1500)
|
}, 1500)
|
||||||
@@ -149,6 +153,8 @@ export default {
|
|||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
message: '<strong>用户名</strong> 或 <strong>密码</strong> 错误'
|
message: '<strong>用户名</strong> 或 <strong>密码</strong> 错误'
|
||||||
})
|
})
|
||||||
|
this.getNewCaptcha()
|
||||||
|
this.loggingIn = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user