feat(admin): 新增转码设置页面
This commit is contained in:
1 parent
723d056fc7
commit
218196ee9f
16 files changed
+1014
-3
No files matched your search
@@ -11,6 +11,7 @@ import { NO_REDIRECT_WHITE_LIST } from '@/constants'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import { getAdminRoleApi, getProfileApi } from '@/api/login'
|
||||
import { landingPath } from '@/utils/landing'
|
||||
import { supplementLocalAdminRoutes } from '@/router/localRoutes'
|
||||
|
||||
const { start, done } = useNProgress()
|
||||
|
||||
@@ -68,6 +69,10 @@ router.beforeEach(async (to, from, next) => {
|
||||
} catch {
|
||||
// 拉取失败时退回上次缓存的菜单,不阻塞进入
|
||||
}
|
||||
const permissions = Array.isArray(userStore.getUserInfo?.permissions)
|
||||
? userStore.getUserInfo.permissions
|
||||
: []
|
||||
routers = supplementLocalAdminRoutes(routers, permissions)
|
||||
await permissionStore.generateRoutes('server', routers)
|
||||
} else {
|
||||
await permissionStore.generateRoutes('frontEnd', roleRouters as string[])
|
||||
|
||||
Reference in new issue
Block a user