zhengyiming
7 天以前 19fb7e7af8464bc88088d8bbc80c481752827994
src/store/modules/permission.ts
@@ -3,7 +3,6 @@
// import { RouteConfigs } from "@/layout/types";
import { constantRoutes, Route } from '@/router';
import { addAsyncRoutes, ascending } from '@/router/utils';
import * as baseModuleServices from '@/services/api/BaseModule';
export interface PermissonState {
  routes: Route[];
@@ -27,12 +26,10 @@
    getModuleList() {
      return new Promise<Route[]>(async (resolve, reject) => {
        try {
          // let res = await userApiClient.apiUserUserMenusGet();
          // let userMenuList = res.data.data;
          // let userInfo = rootGetters['userInfo'] as Getter['userInfo'];
          const res = await baseModuleServices.getCurrentUserModuleList({
            showLoading: false,
          });
          // const res = await baseModuleServices.getCurrentUserModuleList({
          //   showLoading: false,
          // });
          const res = [];
          const accessedRoutes = ascending(addAsyncRoutes(formatModuleList(res, null))); // createAccessedRoutes(userMenuList, userInfo)
          //@ts-ignore
          accessedRoutes.push({ path: '/:pathMatch(.*)*', redirect: '/404', hidden: true });