fix user profile update

This commit is contained in:
Timi
2026-08-07 18:20:29 +08:00
parent 82e717e3c6
commit 16fa5fdd36
10 changed files with 386 additions and 73 deletions
+20 -1
View File
@@ -4,7 +4,26 @@ import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/u
const BASE_URI = "/gao/event";
async function list(req: Page<EventItem>): Promise<PageResult<EventItem>> {
type ListOptions = {
allStores?: boolean;
storeId?: string;
};
async function list(req: Page<EventItem>, options?: ListOptions): Promise<PageResult<EventItem>> {
if (options?.allStores) {
return await axios.post(`${BASE_URI}/list`, req);
}
if (options?.storeId) {
return await axios.post(`${BASE_URI}/list`, {
...req,
equalsExample: {
...(req.equalsExample || {}),
storeId: options.storeId
}
});
}
return await axios.post(`${BASE_URI}/list`, withCurrentStorePage(req));
}