|
@@ -8,10 +8,11 @@ import { router } from '@/router';
|
|
|
import { createStaticRoutes, getAuthVueRoutes } from '@/router/routes';
|
|
|
import { ROOT_ROUTE } from '@/router/routes/builtin';
|
|
|
import { getRouteName, getRoutePath } from '@/router/elegant/transform';
|
|
|
-import { fetchGetConstantRoutes, fetchGetUserRoutes, fetchIsRouteExist } from '@/service/api';
|
|
|
+import { fetchGetUserRoutes, fetchIsRouteExist } from '@/service/api';
|
|
|
import { useAppStore } from '../app';
|
|
|
import { useAuthStore } from '../auth';
|
|
|
import { useTabStore } from '../tab';
|
|
|
+import constantRoutesData from './constantRoutes.json';
|
|
|
import {
|
|
|
filterAuthRoutesByRoles,
|
|
|
getBreadcrumbsByRoute,
|
|
@@ -202,7 +203,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|
|
if (authRouteMode.value === 'static') {
|
|
|
addConstantRoutes(staticRoute.constantRoutes);
|
|
|
} else {
|
|
|
- const { data, error } = await fetchGetConstantRoutes();
|
|
|
+ // const { data, error } = await fetchGetConstantRoutes();
|
|
|
+ const { data, error } = constantRoutesData as any;
|
|
|
|
|
|
if (!error) {
|
|
|
addConstantRoutes(data);
|