feat: 权限逻辑处理
This commit is contained in:
@@ -123,11 +123,11 @@ export const appConfigStore = defineStore({
|
||||
return { data: {} };
|
||||
}
|
||||
},
|
||||
userResource() {
|
||||
userResource(params = {}) {
|
||||
if (this.userResourceApi) {
|
||||
return httpRequest({
|
||||
api: this.userResourceApi,
|
||||
params: {},
|
||||
params,
|
||||
pathParams: {},
|
||||
requestConfig,
|
||||
});
|
||||
|
@@ -90,9 +90,9 @@ export const useRouteStore = defineStore({
|
||||
});
|
||||
// const initPcResource = { application: {}, menus: [] };
|
||||
let initPcResource = [];
|
||||
this.routeModule.sort((a, b) => {
|
||||
return a.route?.meta?.index - b.route?.meta?.index;
|
||||
});
|
||||
// this.routeModule.sort((a, b) => {
|
||||
// return a.route?.meta?.index - b.route?.meta?.index;
|
||||
// });
|
||||
const info = JSON.parse(JSON.stringify(this.routeModule));
|
||||
initRouteMouleList(info);
|
||||
function initRouteMouleList(info) {
|
||||
@@ -116,6 +116,9 @@ export const useRouteStore = defineStore({
|
||||
});
|
||||
}
|
||||
// initPcResource.application = appConfig.resourceInfo?.application as object;
|
||||
console.log(info);
|
||||
|
||||
return;
|
||||
initPcResource = appConfig.resourceInfo?.dealReosurceList
|
||||
? appConfig.resourceInfo?.dealReosurceList(info)
|
||||
: info;
|
||||
|
@@ -105,7 +105,6 @@
|
||||
loading.value = false;
|
||||
if (configStore.enablePermissions) {
|
||||
const res = await configStore.userResource();
|
||||
console.log(res, 'cccccccccccccccccccccccccccccc');
|
||||
|
||||
if (configStore.customApplication) {
|
||||
await useAuthorization.initMenuResource();
|
||||
|
Reference in New Issue
Block a user