diff --git a/src/api/EventAPI.ts b/src/api/EventAPI.ts index 1a23ab9..7650f00 100644 --- a/src/api/EventAPI.ts +++ b/src/api/EventAPI.ts @@ -4,7 +4,26 @@ import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/u const BASE_URI = "/gao/event"; -async function list(req: Page): Promise> { +type ListOptions = { + allStores?: boolean; + storeId?: string; +}; + +async function list(req: Page, options?: ListOptions): Promise> { + 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)); } diff --git a/src/components/GenderIcon.vue b/src/components/GenderIcon.vue index 5f3f213..f64c990 100644 --- a/src/components/GenderIcon.vue +++ b/src/components/GenderIcon.vue @@ -1,6 +1,6 @@