feat(projects): 细节完善、迁移页面

This commit is contained in:
Soybean
2022-01-20 21:24:01 +08:00
parent 28efbdbc70
commit ce531ce5dd
26 changed files with 1114 additions and 225 deletions

View File

@ -18,8 +18,8 @@ export async function handlePagePermission(
const needLogin = Boolean(to.meta?.requiresAuth) || Boolean(permissions.length);
const hasPermission = !permissions.length || permissions.includes(auth.userInfo.userRole);
// 初始化动态路由
if (!route.isAddedDynamicRoute) {
// 添加动态路由
await route.initDynamicRoute(router);
if (to.name === routeName('not-found-page')) {
@ -35,6 +35,13 @@ export async function handlePagePermission(
return;
}
// 外链路由, 从新标签打开,返回上一个路由
if (to.meta.href) {
window.open(to.meta.href);
next({ path: from.fullPath, replace: true, query: from.query });
return;
}
const actions: Common.StrategyAction[] = [
// 已登录状态跳转登录页,跳转至首页
[