From 16fa5fdd36bcf3b9a352fa9842a7323cc5c25521 Mon Sep 17 00:00:00 2001 From: Timi Date: Fri, 7 Aug 2026 18:20:29 +0800 Subject: [PATCH] fix user profile update --- src/api/EventAPI.ts | 21 +++- src/components/GenderIcon.vue | 2 +- src/pages/management/CustomerEdit.vue | 81 ++++++++++++++- src/pages/management/CustomerList.vue | 71 +++++++++++-- src/pages/management/EventEdit.vue | 84 +++++++++++++++- src/pages/management/EventList.vue | 111 +++++++++++++++++++-- src/pages/management/ManagementProfile.vue | 38 ++----- src/pages/tabs/ManagementTab.vue | 42 ++++---- src/store/currentStoreStore.ts | 5 +- src/utils/avatar.ts | 4 +- 10 files changed, 386 insertions(+), 73 deletions(-) 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 @@