fix: 【登录没有权限】 没有提示,且console 报错

This commit is contained in:
lbw 2023-03-06 12:45:43 +08:00
parent 7a29c1931f
commit 38a38e546f
5 changed files with 8 additions and 4 deletions

View File

@ -83,7 +83,7 @@ export async function initBackEndControlRoutes() {
const res = await getBackEndControlRoutes();
// 无登录权限时,添加判断
// https://gitee.com/lyt-top/vue-next-admin/issues/I64HVO
if (res.data.length <= 0) return Promise.resolve(true);
if ((res.data || []).length <= 0) return Promise.resolve(true);
// 存储接口原始路由未处理component根据需求选择使用
useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data)));
// 处理路由component替换 dynamicRoutes/@/router/route第一个顶级 children 的路由

View File

@ -43,7 +43,7 @@ export async function initBackEndControlRoutes() {
const res = await getBackEndControlRoutes();
// 无登录权限时,添加判断
// https://gitee.com/lyt-top/vue-next-admin/issues/I64HVO
if (res.data.length <= 0) return Promise.resolve(true);
if ((res.data || []).length <= 0) return Promise.resolve(true);
// 存储接口原始路由未处理component根据需求选择使用
useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data)));
// 处理路由component替换 dynamicRoutes/@/router/route第一个顶级 children 的路由

View File

@ -140,6 +140,10 @@ const dictType = ref([
label: '本级',
value: 3,
},
{
label: '本人',
value: 4,
},
]);
//

View File

@ -91,7 +91,7 @@ const handleLogin = async () => {
.then(() => {
emit('signInSuccess');
})
.catch(() => {
.finally(() => {
loading.value = false;
});
};

View File

@ -101,7 +101,7 @@ const onSignIn = () => {
//
emit('signInSuccess');
})
.catch(() => {
.finally(() => {
loading.value = false;
});
};