vue-vben-admin/src/api/demo/system.ts

31 lines
923 B
TypeScript
Raw Normal View History

2021-03-01 22:54:21 +08:00
import {
AccountParams,
DeptListItem,
2021-03-03 22:52:25 +08:00
MenuParams,
RoleParams,
MenuListGetResultModel,
2021-03-01 22:54:21 +08:00
DeptListGetResultModel,
AccountListGetResultModel,
2021-03-03 22:52:25 +08:00
RoleListGetResultModel,
2021-03-01 22:54:21 +08:00
} from './model/systemModel';
2021-03-01 00:56:25 +08:00
import { defHttp } from '/@/utils/http/axios';
enum Api {
AccountList = '/system/getAccountList',
2021-03-01 22:54:21 +08:00
DeptList = '/system/getDeptList',
2021-03-03 22:52:25 +08:00
MenuList = '/system/getMenuList',
RoleList = '/system/getRoleList',
2021-03-01 00:56:25 +08:00
}
2021-03-01 22:54:21 +08:00
export const getAccountList = (params: AccountParams) =>
defHttp.get<AccountListGetResultModel>({ url: Api.AccountList, params });
export const getDeptList = (params?: DeptListItem) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params });
2021-03-03 22:52:25 +08:00
export const getMenuList = (params?: MenuParams) =>
defHttp.get<MenuListGetResultModel>({ url: Api.MenuList, params });
export const getRoleList = (params?: RoleParams) =>
defHttp.get<RoleListGetResultModel>({ url: Api.RoleList, params });