diff --git a/src/views/login.vue b/src/views/login.vue index 07edb31..026d8eb 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -58,6 +58,7 @@ import { EncryptAES } from '@/utils/AES.js'; import useUserStore from '@/store/modules/user'; import usePermissionStore from '@/store/modules/permission'; +import { ElLoading } from 'element-plus'; const userStore = useUserStore(); const router = useRouter(); @@ -125,6 +126,11 @@ userStore .login(params) .then(res => { + window.loginLoading = ElLoading.service({ + lock: true, + background: 'rgba(0, 0, 0, 0.7)', + text: '正在登录中...', + }); // 登录成功之后都加载对应路由 router.push({ path: '/chengguanweiScreen' }); localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目综合管控首页 diff --git a/src/views/login.vue b/src/views/login.vue index 07edb31..026d8eb 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -58,6 +58,7 @@ import { EncryptAES } from '@/utils/AES.js'; import useUserStore from '@/store/modules/user'; import usePermissionStore from '@/store/modules/permission'; +import { ElLoading } from 'element-plus'; const userStore = useUserStore(); const router = useRouter(); @@ -125,6 +126,11 @@ userStore .login(params) .then(res => { + window.loginLoading = ElLoading.service({ + lock: true, + background: 'rgba(0, 0, 0, 0.7)', + text: '正在登录中...', + }); // 登录成功之后都加载对应路由 router.push({ path: '/chengguanweiScreen' }); localStorage.setItem('routerPartKFC', 'Project'); //默认加载项目综合管控首页 diff --git a/src/views/sponeScreen/chengguanweiScreen/index.vue b/src/views/sponeScreen/chengguanweiScreen/index.vue index 88a6c49..9de5fca 100644 --- a/src/views/sponeScreen/chengguanweiScreen/index.vue +++ b/src/views/sponeScreen/chengguanweiScreen/index.vue @@ -29,6 +29,7 @@ onMounted(() => { setScreenType(); //兼容城管委15楼大屏3800*866和1920*1080 + window.loginLoading.close(); });