!182 update src/views/Login/components/MobileForm.vue.
Merge pull request !182 from water/N/Apull/183/head
commit
59de1d68ba
|
@ -185,12 +185,17 @@ const signIn = async () => {
|
||||||
await getTenantId()
|
await getTenantId()
|
||||||
const data = await validForm()
|
const data = await validForm()
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '正在加载系统中...',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
loginLoading.value = true
|
loginLoading.value = true
|
||||||
smsVO.loginSms.mobile = loginData.loginForm.mobileNumber
|
smsVO.loginSms.mobile = loginData.loginForm.mobileNumber
|
||||||
smsVO.loginSms.code = loginData.loginForm.code
|
smsVO.loginSms.code = loginData.loginForm.code
|
||||||
await smsLogin(smsVO.loginSms)
|
await smsLogin(smsVO.loginSms)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
setToken(res?.token)
|
setToken(res)
|
||||||
if (!redirect.value) {
|
if (!redirect.value) {
|
||||||
redirect.value = '/'
|
redirect.value = '/'
|
||||||
}
|
}
|
||||||
|
@ -199,6 +204,10 @@ const signIn = async () => {
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loginLoading.value = false
|
loginLoading.value = false
|
||||||
|
setTimeout(() => {
|
||||||
|
const loadingInstance = ElLoading.service()
|
||||||
|
loadingInstance.close()
|
||||||
|
}, 400)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue