|
|
@@ -19,17 +19,17 @@ export const loginApi = (params: Login.ReqLoginForm): Promise<{ data: Login.ResL
|
|
|
|
|
|
// 获取菜单列表
|
|
|
export const getAuthMenuListApi = (params: any = {}) => {
|
|
|
- // const userStore = useUserStore();
|
|
|
- // const requestParams = { ...params };
|
|
|
- // const loginAccount = userStore.userInfo?.name?.trim();
|
|
|
- // if (loginAccount && loginAccount.toLowerCase() === "admin") {
|
|
|
- // requestParams.type = 1;
|
|
|
- // } else {
|
|
|
- // requestParams.type = 0;
|
|
|
- // }
|
|
|
- // return http.get<Menu.MenuOptions[]>(PORT1+ `/routingInfo`, requestParams, { loading: false });
|
|
|
+ const userStore = useUserStore();
|
|
|
+ const requestParams = { ...params };
|
|
|
+ const loginAccount = userStore.userInfo?.name?.trim();
|
|
|
+ if (loginAccount && loginAccount.toLowerCase() === "admin") {
|
|
|
+ requestParams.type = 1;
|
|
|
+ } else {
|
|
|
+ requestParams.type = 0;
|
|
|
+ }
|
|
|
+ return http.get<Menu.MenuOptions[]>(PORT1 + `/routingInfo`, requestParams, { loading: false });
|
|
|
// 如果想让菜单变为本地数据,注释上一行代码,并引入本地 authMenuList.json 数据
|
|
|
- return authMenuList;
|
|
|
+ // return authMenuList;
|
|
|
};
|
|
|
|
|
|
// 获取按钮权限
|