refactor event

This commit is contained in:
Timi
2026-08-05 22:50:22 +08:00
parent 22ff13b1fe
commit 1243068fc3
46 changed files with 961 additions and 789 deletions
+42
View File
@@ -0,0 +1,42 @@
import { axios, type Page, type PageResult, type Role } from "timi-web";
import type { ManagedUser } from "@/types/ManagedUser";
const BASE_URI = "/gao/user";
async function list(req: Page<ManagedUser>): Promise<PageResult<ManagedUser>> {
return await axios.post(`${BASE_URI}/list`, req);
}
async function detail(id: string): Promise<ManagedUser> {
return await axios.post(`${BASE_URI}/detail`, undefined, {
params: { id }
});
}
async function create(req: ManagedUser): Promise<ManagedUser> {
return await axios.post(`${BASE_URI}/create`, req);
}
async function update(req: ManagedUser): Promise<ManagedUser> {
return await axios.post(`${BASE_URI}/update`, req);
}
async function remove(id: string): Promise<void> {
return await axios.post(`${BASE_URI}/delete`, undefined, {
params: { id }
});
}
async function roleList(): Promise<Role[]> {
return await axios.post(`${BASE_URI}/role/list`);
}
export default {
list,
detail,
create,
update,
remove,
roleList
};