diff --git a/JC-Salon-Frontend/src/App.vue b/JC-Salon-Frontend/src/App.vue index 6f75b9db..8632575b 100644 --- a/JC-Salon-Frontend/src/App.vue +++ b/JC-Salon-Frontend/src/App.vue @@ -205,7 +205,6 @@ const checkPopupMessages = async () => { } watch(() => route.path, async () => { - // 检查当前是否是后台页面,如果是则不加载购物车数据 const isAdminPage = route.matched.some(r => r.meta.isAdmin) await refreshShopTheme(isAdminPage ? adminThemeRefreshOptions : customerThemeRefreshOptions) if (!isAdminPage) { diff --git a/JC-Salon-Frontend/src/api/admin.ts b/JC-Salon-Frontend/src/api/admin.ts index 07ed8c47..66a48442 100644 --- a/JC-Salon-Frontend/src/api/admin.ts +++ b/JC-Salon-Frontend/src/api/admin.ts @@ -578,86 +578,6 @@ export const adminArtistApi = { } } -/** - * Purpose: Coupon supports admin.ts by holding or executing the coupon page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface Coupon { - id: IdType - couponCode?: string - couponName: string - couponType: number - couponTypeName?: string - discountValue?: string - minAmount?: number - reduceAmount?: string - totalCount?: number - usedCount?: number - remainingCount?: number - startTime: string - endTime: string - status?: number - statusName?: string - shopId?: IdType - shopName?: string - couponScene?: string - requiredVipLevel?: string - autoMatch?: number - availableTags?: Tag[] - unavailableTags?: Tag[] - createTime: string - updateTime: string -} - -/** - * adminCouponApi groups all API calls for this page domain. - * Call guide: pass the typed payload or identifier into the method below, and use the returned Promise in the page script. - */ -export const adminCouponApi = { - /** - * `listAllCoupons` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param shopId?: IdType caller-supplied value for `shopId?: IdType` - */ - listAllCoupons: (shopId?: IdType) => { - const params = shopId ? { shopId } : {} - return adminApi.get('/coupon/list/all', { params }) as unknown as Promise - }, - /** - * `createCoupon` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param data: any caller-supplied value for `data: any` - */ - createCoupon: (data: any) => { - return adminApi.post('/coupon/create', data) - }, - /** - * `updateCoupon` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - * @param data: any caller-supplied value for `data: any` - */ - updateCoupon: (id: IdType, data: any) => { - return adminApi.put(`/coupon/update/${id}`, data) - }, - /** - * `deleteCoupon` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - */ - deleteCoupon: (id: IdType) => { - return adminApi.delete(`/coupon/delete/${id}`) - }, - /** - * `distributeCoupon` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param data: any caller-supplied value for `data: any` - */ - distributeCoupon: (data: any) => { - return adminApi.post('/coupon/distribute', null, { params: data }) - } -} - /** * Purpose: AdminCommentVO supports admin.ts by holding or executing the admin comment vo page or API role. * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. @@ -719,11 +639,8 @@ export interface Product { imageFileIds?: string imageUrls?: string[] bookableArtists?: string - availableCoupons?: string frontVisible?: number sourceType?: string - likeCount?: number - collectCount?: number createTime: string updateTime: string } @@ -1014,22 +931,6 @@ export interface ArtistScheduleQuery { endDate?: string } -export interface PaymentOrderVO { - id: IdType - payNo?: string - orderId: IdType - orderNo?: string - userId?: IdType - shopId?: IdType - channel?: string - status?: string - payAmount?: number - paidAmount?: number - payTime?: string - expireTime?: string - remark?: string -} - export interface AfterSaleVO { id: IdType afterSaleNo?: string @@ -1086,33 +987,6 @@ export interface InventoryAdjustRequest { remark?: string } -export interface CampaignVO { - id: IdType - shopId?: IdType - title: string - description?: string - scene?: string - productIds?: string - couponIds?: string - status?: number - startTime?: string - endTime?: string - sortOrder?: number -} - -export interface CampaignRequest { - shopId?: IdType - title?: string - description?: string - scene?: string - productIds?: string - couponIds?: string - status?: number - startTime?: string - endTime?: string - sortOrder?: number -} - export interface SalonDashboardOverviewVO { date: string degraded?: boolean @@ -1151,14 +1025,6 @@ export const adminArtistScheduleApi = { } } -export const adminPaymentApi = { - manualConfirmOrder: (orderId: IdType, remark?: string) => { - return adminApi.post(`/payment/order/${orderId}/manual-confirm`, undefined, { - params: { remark } - }) as unknown as Promise - } -} - export const adminAfterSaleApi = { listAfterSales: (params: AfterSaleQuery) => { return adminApi.get>('/after-sale/list', { params }) as unknown as Promise> @@ -1183,15 +1049,6 @@ export const adminInventoryApi = { } } -export const adminCampaignApi = { - listCampaigns: (params: { status?: number; page: number; size: number }) => { - return adminApi.get>('/campaign/list', { params }) as unknown as Promise> - }, - saveCampaign: (data: CampaignRequest) => { - return adminApi.post('/campaign/save', data) as unknown as Promise - } -} - /** * adminUserApi groups all API calls for this page domain. * Call guide: pass the typed payload or identifier into the method below, and use the returned Promise in the page script. @@ -1296,110 +1153,6 @@ export const adminUserApi = { getUserInfo: () => { return adminApi.get('/user/info') as unknown as Promise }, - /** - * `getUserAsset` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - */ - getUserAsset: (id: IdType) => { - return adminApi.get(`/user/${id}/asset`) as unknown as Promise - }, - /** - * `getUserBalanceHistory` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - */ - getUserBalanceHistory: (id: IdType) => { - return adminApi.get(`/user/${id}/balance/history`) as unknown as Promise - }, - /** - * `changeUserBalance` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - * @param data: AdminUserBalanceChangeRequest caller-supplied value for `data: AdminUserBalanceChangeRequest` - */ - changeUserBalance: (id: IdType, data: AdminUserBalanceChangeRequest) => { - return adminApi.post(`/user/${id}/balance/change`, data) as unknown as Promise - }, - /** - * `overrideUserVip` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - * @param data: AdminUserVipOverrideRequest caller-supplied value for `data: AdminUserVipOverrideRequest` - */ - overrideUserVip: (id: IdType, data: AdminUserVipOverrideRequest) => { - return adminApi.post(`/user/${id}/vip/override`, data) as unknown as Promise - }, - /** - * `recalculateUserVip` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - */ - recalculateUserVip: (id: IdType) => { - return adminApi.post(`/user/${id}/vip/recalculate`) as unknown as Promise - } -} - -/** - * Purpose: UserAssetVO supports admin.ts by holding or executing the user asset vo page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface UserAssetVO { - userId: IdType - nickname: string - balance: number - totalRechargeAmount: number - lastRechargeTime?: string - vipInfoId?: IdType - vipLevel: string - benefitId?: IdType - benefitInfo?: string - manualOverride: boolean - vipStartTime?: string - vipExpireTime?: string -} - -/** - * Purpose: UserBalanceHistoryItem supports admin.ts by holding or executing the user balance history item page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface UserBalanceHistoryItem { - id: IdType - userId: IdType - userNickname?: string - amount: number - type?: string - currentBalance?: number - beforeBalance?: number - afterBalance?: number - changeScene?: string - relatedOrderId?: IdType - relatedOrderNo?: string - externalOrderNo?: string - operatorId?: IdType - remark?: string - changeTime: string -} - -/** - * Purpose: AdminUserBalanceChangeRequest supports admin.ts by holding or executing the admin user balance change request page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface AdminUserBalanceChangeRequest { - amount: number - changeScene: string - relatedOrderId?: IdType - externalOrderNo?: string - remark?: string -} - -/** - * Purpose: AdminUserVipOverrideRequest supports admin.ts by holding or executing the admin user vip override request page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface AdminUserVipOverrideRequest { - vipLevel: string - remark?: string } /** @@ -1486,9 +1239,6 @@ export const adminOrderApi = { updateOrderStatus: (id: IdType, status: number) => { return adminApi.put(`/order/update-status/${id}`, {}, { params: { status } }) }, - manualConfirmPayment: (id: IdType, remark?: string) => { - return adminPaymentApi.manualConfirmOrder(id, remark) - }, submitQuote: (id: IdType, data: { remark?: string; items: Array<{ orderItemId: IdType; quotedPrice: number }> }) => { return adminApi.post(`/order/${id}/quote`, data) }, @@ -1720,91 +1470,6 @@ export const adminAnnouncementApi = { } } -/** - * Purpose: VipRechargePlanVO supports admin.ts by holding or executing the vip recharge plan vo page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface VipRechargePlanVO { - id: IdType - shopId: IdType - shopName?: string - title: string - rechargeAmount: number - giftAmount: number - vipLevel: string - description?: string - sortOrder?: number - status: number - createTime?: string - updateTime?: string -} - -/** - * Purpose: VipRechargePlanRequest supports admin.ts by holding or executing the vip recharge plan request page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface VipRechargePlanRequest { - shopId?: IdType - title: string - rechargeAmount: number - giftAmount: number - vipLevel: string - description?: string - sortOrder?: number - status?: number -} - -/** - * adminVipRechargePlanApi groups all API calls for this page domain. - * Call guide: pass the typed payload or identifier into the method below, and use the returned Promise in the page script. - */ -export const adminVipRechargePlanApi = { - /** - * `listPlans` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param shopId?: IdType caller-supplied value for `shopId?: IdType` - */ - listPlans: (shopId?: IdType) => { - const params = shopId ? { shopId } : {} - return adminApi.get('/vip-recharge-plan/admin/list', { params }) as unknown as Promise - }, - /** - * `createPlan` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param data: VipRechargePlanRequest caller-supplied value for `data: VipRechargePlanRequest` - */ - createPlan: (data: VipRechargePlanRequest) => { - return adminApi.post('/vip-recharge-plan/admin/create', data) - }, - /** - * `updatePlan` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - * @param data: VipRechargePlanRequest caller-supplied value for `data: VipRechargePlanRequest` - */ - updatePlan: (id: IdType, data: VipRechargePlanRequest) => { - return adminApi.put(`/vip-recharge-plan/admin/${id}`, data) - }, - /** - * `updateStatus` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param id: IdType caller-supplied value for `id: IdType` - * @param status: number caller-supplied value for `status: number` - */ - updateStatus: (id: IdType, status: number) => { - return adminApi.put(`/vip-recharge-plan/admin/${id}/status`, null, { params: { status } }) - }, - /** - * `listVipLevelOptions` API call. Use this method from the page script to invoke the backend endpoint tied to this feature. - * Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller. - * @param shopId?: IdType caller-supplied value for `shopId?: IdType` - */ - listVipLevelOptions: (shopId?: IdType) => { - const params = shopId ? { shopId } : {} - return adminApi.get('/vip-recharge-plan/admin/vip-level-options', { params }) as unknown as Promise - } -} - /** * Purpose: MessageHubPushConfigVO supports admin.ts by holding or executing the message hub push config vo page or API role. * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. diff --git a/JC-Salon-Frontend/src/api/product.ts b/JC-Salon-Frontend/src/api/product.ts index 292db2ac..92e824d8 100644 --- a/JC-Salon-Frontend/src/api/product.ts +++ b/JC-Salon-Frontend/src/api/product.ts @@ -28,14 +28,11 @@ export interface ProductVO { bookableArtists?: string availableBookableArtistCount?: number bookableArtistRestricted?: boolean - availableCoupons?: string category: string tags?: string tagList?: string[] tagInfos?: TagInfo[] status: number - likeCount?: number - collectCount?: number createTime: string updateTime: string } @@ -111,14 +108,6 @@ export const productApi = { return await api.get(`/product/list/tag/${tag}`) as unknown as ProductVO[] }, - likeProduct: async (productId: IdType): Promise => { - return await api.post(`/product-like/like/${productId}`) as unknown as boolean - }, - - unlikeProduct: async (productId: IdType): Promise => { - return await api.post(`/product-like/unlike/${productId}`) as unknown as boolean - }, - searchProducts: async (keyword: string): Promise => { return await api.get('/product/list/search', { params: { diff --git a/JC-Salon-Frontend/src/api/user.ts b/JC-Salon-Frontend/src/api/user.ts index 4cc55314..53072cd9 100644 --- a/JC-Salon-Frontend/src/api/user.ts +++ b/JC-Salon-Frontend/src/api/user.ts @@ -206,46 +206,6 @@ export interface UpdatePhoneRequest { verificationCode: string } -/** - * Purpose: UserAssetVO supports user.ts by holding or executing the user asset vo page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface UserAssetVO { - userId: IdType - nickname: string - balance: number - totalRechargeAmount: number - lastRechargeTime?: string - vipInfoId?: IdType - vipLevel: string - benefitId?: IdType - benefitInfo?: string - manualOverride?: boolean - vipStartTime?: string - vipExpireTime?: string -} - -/** - * Purpose: BalanceHistoryItem supports user.ts by holding or executing the balance history item page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface BalanceHistoryItem { - id: IdType - userId: IdType - userNickname?: string - amount: number - type?: string - currentBalance?: number - beforeBalance?: number - afterBalance?: number - changeScene?: string - relatedOrderId?: IdType - relatedOrderNo?: string - externalOrderNo?: string - remark?: string - changeTime?: string -} - /** * Purpose: SystemMessageVO supports user.ts by holding or executing the system message vo page or API role. * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. @@ -284,23 +244,6 @@ export interface AnnouncementVO { publishTime?: string } -/** - * Purpose: VipRechargePlanVO supports user.ts by holding or executing the vip recharge plan vo page or API role. - * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. - */ -export interface VipRechargePlanVO { - id: IdType - shopId: IdType - shopName?: string - title: string - rechargeAmount: number - giftAmount: number - vipLevel: string - description?: string - sortOrder?: number - status: number -} - /** * Purpose: ContactInfoVO supports user.ts by holding or executing the contact info vo page or API role. * Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow. @@ -398,12 +341,6 @@ export const userApi = { switchShop: (shopId?: string | number) => { return api.post('/user/switch-shop', { shopId }) }, - getMyAsset: async (): Promise => { - return await api.get('/user/asset/me') as unknown as UserAssetVO - }, - getMyBalanceHistory: async (): Promise => { - return await api.get('/user/balance/history/me') as unknown as BalanceHistoryItem[] - }, listMyMessages: async (): Promise => { return await api.get('/system-message/my/list') as unknown as SystemMessageVO[] }, @@ -435,9 +372,6 @@ export const userApi = { listMyAnnouncements: async (): Promise => { return await api.get('/announcement/my/list') as unknown as AnnouncementVO[] }, - listMyVipRechargePlans: async (): Promise => { - return await api.get('/vip-recharge-plan/my/list') as unknown as VipRechargePlanVO[] - }, getMyRelation: async (): Promise => { return await api.get('/user/relation/me') as unknown as UserRelationVO }, diff --git a/JC-Salon-Frontend/src/views/ArtistProfileView.vue b/JC-Salon-Frontend/src/views/ArtistProfileView.vue index 9dec8136..27e9ce4d 100644 --- a/JC-Salon-Frontend/src/views/ArtistProfileView.vue +++ b/JC-Salon-Frontend/src/views/ArtistProfileView.vue @@ -3,7 +3,6 @@ import { computed, onMounted, ref, shallowRef } from 'vue' import { useRoute, useRouter } from 'vue-router' import { CalendarOutlined, - HeartOutlined, LeftOutlined, MessageOutlined, SafetyCertificateOutlined, @@ -166,8 +165,6 @@ const mapProductToWork = (product: ProductVO): NailArtistWorkVO & { imageFileIds imageUrls: product.imageUrls, imageFileIds: product.imageFileIds, tags: product.tagList || product.tags?.split(/[;,,、]/).map(tag => tag.trim()).filter(Boolean), - likeCount: product.likeCount, - collectCount: product.collectCount }) const loadSupplementWorks = async (existingWorks: NailArtistWorkVO[]): Promise => { @@ -433,10 +430,6 @@ onMounted(loadProfile) 咨询 -