| | |
| | | export async function initBackEndControlRoutes() { |
| | | if (window.nextLoading === undefined) NextLoading.start(); |
| | | if (!Cookies.get('token')) return false; |
| | | const res = await getBackEndControlRoutes(Cookies.get('projectId') === null ? '' : Cookies.get('projectId')); |
| | | const res = await getBackEndControlRoutes(); |
| | | debugger |
| | | await useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data.data))); |
| | | dynamicRoutes[0].children = await backEndComponent(res.data.data); |
| | | await setAddRoute(); |
| | |
| | | }); |
| | | } |
| | | |
| | | export async function getBackEndControlRoutes(value: string) { |
| | | export async function getBackEndControlRoutes() { |
| | | // const stores = useUserInfo(pinia); |
| | | // const { userInfos } = storeToRefs(stores); |
| | | // const auth = userInfos.value.roles[0]; |
| | | return menuApi.getMenuAdmin(value); |
| | | return menuApi.getMenuAdmin(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @description 路径:/src/views/system/homeMenu/components/menuDialog.vue |
| | | */ |
| | | export function setBackEndControlRefreshRoutes() { |
| | | getBackEndControlRoutes(Cookies.get('projectId')); |
| | | getBackEndControlRoutes(); |
| | | } |
| | | |
| | | export function backEndComponent(routes: any) { |