From e7e0c7a6b791579c44012dfcce7b87ed13e319d5 Mon Sep 17 00:00:00 2001 From: water <2778335106@qq.com> Date: Wed, 12 Jul 2023 07:35:48 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/views/Login/components/MobileForm.?= =?UTF-8?q?vue.=20=E6=88=91=E5=8F=91=E7=8E=B0=EF=BC=8C=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=99=BB=E9=99=86=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E7=99=BB=E9=99=86=E6=88=90=E5=8A=9F=E4=BA=86=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC=EF=BC=8C?= =?UTF-8?q?=E6=88=91=E6=89=8B=E5=8A=A8=E8=B7=AF=E7=94=B1=E5=88=B0/?= =?UTF-8?q?=EF=BC=8C=E5=8F=88=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E7=99=BB=E9=99=86=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=98=AFtoken=E6=B2=A1=E5=AD=98=E8=BF=9B=E5=8E=BB=EF=BC=8C?= =?UTF-8?q?=E6=88=91=E5=B0=B1=E7=85=A7=E8=BF=99loginform=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: water <2778335106@qq.com> (cherry picked from commit b061c8f32b06acc60b8003bbe08d240bad4a6b49) --- src/views/Login/components/MobileForm.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue index fb88cc29..e1d40f78 100644 --- a/src/views/Login/components/MobileForm.vue +++ b/src/views/Login/components/MobileForm.vue @@ -183,12 +183,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 smsLoginApi(smsVO.loginSms) .then(async (res) => { - setToken(res?.token) + setToken(res) if (!redirect.value) { redirect.value = '/' } @@ -197,6 +202,10 @@ const signIn = async () => { .catch(() => {}) .finally(() => { loginLoading.value = false + setTimeout(() => { + const loadingInstance = ElLoading.service() + loadingInstance.close() + }, 400) }) }