| | |
| | | export async function initBackEndControlRoutes() { |
| | | if (window.nextLoading === undefined) NextLoading.start(); |
| | | if (!Session.get('token')) return false; |
| | | useUserInfo().setUserInfos(); |
| | | // if(Session.get('ifMenu')) |
| | | const res = await getBackEndControlRoutes(Session.get('projectId')); |
| | | useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data.data))); |
| | | dynamicRoutes[0].children = await backEndComponent(res.data.data); |
| | |
| | | |
| | | |
| | | export async function getBackEndControlRoutes(value : string) { |
| | | const stores = useUserInfo(pinia); |
| | | const { userInfos } = storeToRefs(stores); |
| | | const auth = userInfos.value.roles[0]; |
| | | // const stores = useUserInfo(pinia); |
| | | // const { userInfos } = storeToRefs(stores); |
| | | // const auth = userInfos.value.roles[0]; |
| | | return menuApi.getMenuAdmin(value); |
| | | |
| | | } |