perf: 优化示例代码

This commit is contained in:
xiaoxian521
2022-04-11 12:17:47 +08:00
parent c4ebacedfe
commit 160db34fa0
12 changed files with 105 additions and 60 deletions

View File

@@ -1,17 +1,17 @@
import { http } from "../utils/http";
interface postType extends Promise<any> {
interface ResponseType extends Promise<any> {
data?: object;
code?: number;
msg?: string;
}
// 获取岗位管理列表
export const getPostList = (data?: object): postType => {
return http.request("post", "/system", { data });
// 获取角色管理列表
export const getRoleList = (data?: object): ResponseType => {
return http.request("post", "/role", { data });
};
// 获取部门管理列表
export const getDeptList = (data?: object): postType => {
export const getDeptList = (data?: object): ResponseType => {
return http.request("post", "/dept", { data });
};