!183 同步商城实现

Merge pull request !183 from 芋道源码/dev
This commit is contained in:
芋道源码
2023-07-26 04:56:22 +00:00
committed by Gitee
60 changed files with 4988 additions and 541 deletions

View File

@ -185,12 +185,17 @@ const signIn = async () => {
await getTenantId()
const data = await validForm()
if (!data) return
ElLoading.service({
lock: true,
text: '正在加载系统中...',
background: 'rgba(0, 0, 0, 0.7)'
})
loginLoading.value = true
smsVO.loginSms.mobile = loginData.loginForm.mobileNumber
smsVO.loginSms.code = loginData.loginForm.code
await smsLogin(smsVO.loginSms)
.then(async (res) => {
setToken(res?.token)
setToken(res)
if (!redirect.value) {
redirect.value = '/'
}
@ -199,6 +204,10 @@ const signIn = async () => {
.catch(() => {})
.finally(() => {
loginLoading.value = false
setTimeout(() => {
const loadingInstance = ElLoading.service()
loadingInstance.close()
}, 400)
})
}
</script>