功能(网页):新增客户体验流程

This commit is contained in:
xiaowang
2026-05-23 21:56:18 +08:00
parent c2c985b2f8
commit 861eea933b
28 changed files with 2236 additions and 108 deletions
+54
View File
@@ -49,6 +49,56 @@ export interface ShopSimpleVO {
name?: string
}
/**
* Purpose: ShopTrustProfileVO carries public trust signals for a shop detail page.
* Usage: fetch it with getTrustProfile and render ratings, recent reviews, environment images, and booking hints.
*/
export interface ShopTrustProfileVO {
shopId: IdType
shopName?: string
businessHoursText?: string
businessStatusText?: string
locationAvailable?: boolean
distanceCapabilityText?: string
navigationAvailable?: boolean
stats?: {
averageRating?: number
reviewCount?: number
productCount?: number
recentReviewCount?: number
}
environmentImages?: string[]
featuredProducts?: Array<{
id: IdType
title?: string
imageUrl?: string
price?: number
likeCount?: number
collectCount?: number
availableBookableArtistCount?: number
bookingHint?: string
}>
recentReviews?: Array<{
id: IdType
productId?: IdType
productTitle?: string
ratingScore?: number
content?: string
imageUrls?: string[]
submittedAt?: string
}>
availabilitySummary?: {
available?: boolean
summaryText?: string
nextSlots?: string[]
}
contactSummary?: {
actionText?: string
phoneExposed?: boolean
phone?: string
}
}
/**
* Purpose: ListShopsParams supports shop.ts by holding or executing the list shops params 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.
@@ -124,5 +174,9 @@ export const shopApi = {
getShopById: async (id: IdType): Promise<ShopVO> => {
return await api.get<ShopVO>(`/shop/get/${id}`) as unknown as ShopVO
},
getTrustProfile: async (id: IdType): Promise<ShopTrustProfileVO> => {
return await api.get<ShopTrustProfileVO>(`/shop/trust-profile/${id}`) as unknown as ShopTrustProfileVO
}
}