diff --git a/src/views/cas-login/index.vue b/src/views/cas-login/index.vue index 9cdd6a8..996d4e5 100644 --- a/src/views/cas-login/index.vue +++ b/src/views/cas-login/index.vue @@ -8,14 +8,15 @@ const router = useRouter(); const tokenValue = reactive(router.currentRoute.value.query.token) console.log('tokenValue', tokenValue) const init = () => { - // console.log('authStore.casToken(tokenValue)',authStore.casToken(tokenValue)) + const loading = ElLoading.service({ + lock: true, + text: '登录中...', + background: 'rgba(0, 0, 0, 0.7)', + }) if (authStore.casToken(tokenValue)) { - // ElLoading.service({text: '正在加载系统资源', background: '#409eff', lock: true}) + loading.close() router.push('/') } - // else { - // router.push('/login') - // } } init() diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 6ddf529..918cd88 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -66,10 +66,14 @@ const handleLogin = (instance) => { if(!instance) return instance.validate( async (valid, fields)=>{ if (!valid) return + ElLoading.service({ + lock: true, + text: '登录中...', + background: 'rgba(0, 0, 0, 0.7)', + }) // 发送请求 await authStore.userLogin(loginForm).then(res=>{ if(res) { - ElLoading.service({text: '正在加载系统资源',background: '#409eff',lock: true}) router.push('/') }else { getCode()