add store

This commit is contained in:
Timi
2026-08-07 11:32:48 +08:00
parent 9df6dfaf59
commit fab3cd8891
21 changed files with 1355 additions and 31 deletions
+4 -3
View File
@@ -1,10 +1,11 @@
import { axios, type Page, type PageResult, type Role } from "timi-web";
import type { ManagedUser } from "@/types/ManagedUser";
import { withCurrentStoreId, withCurrentStorePage } from "@/utils/store";
const BASE_URI = "/gao/user";
async function list(page: Page<ManagedUser>): Promise<PageResult<ManagedUser>> {
return await axios.post(`${BASE_URI}/list`, page);
return await axios.post(`${BASE_URI}/list`, withCurrentStorePage(page));
}
async function detail(id: string): Promise<ManagedUser> {
@@ -14,11 +15,11 @@ async function detail(id: string): Promise<ManagedUser> {
}
async function create(user: ManagedUser): Promise<ManagedUser> {
return await axios.post(`${BASE_URI}/create`, user);
return await axios.post(`${BASE_URI}/create`, withCurrentStoreId(user));
}
async function update(user: ManagedUser): Promise<ManagedUser> {
return await axios.post(`${BASE_URI}/update`, user);
return await axios.post(`${BASE_URI}/update`, withCurrentStoreId(user));
}
async function remove(id: string): Promise<void> {