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

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
+69
View File
@@ -0,0 +1,69 @@
import api from './index'
import type { IdType } from '@/utils/id'
export interface NailArtistAvailabilityVO {
startTime: string
endTime: string
dateText: string
timeText: string
available: boolean
}
export interface NailArtistWorkVO {
id: IdType
title?: string
description?: string
price?: number | string
coverImageUrl?: string
imageUrls?: string[]
tags?: string[]
likeCount?: number
collectCount?: number
}
export interface NailArtistReviewVO {
id: IdType
artistId: IdType
customerId?: IdType
customerName?: string
customerAvatar?: string
productId?: IdType
productTitle?: string
rating?: number | string
content?: string
imageFileIds?: IdType[]
imageUrls?: string[]
submittedAt?: string
}
export interface NailArtistProfileVO {
artistId: IdType
artistName?: string
avatar?: string
identity?: string
signature?: string
experience?: number
status?: number
shopId?: IdType
shopName?: string
rating?: number | string
serviceCount?: number | string
workStartTime?: string
workEndTime?: string
styleTags?: string[]
works?: NailArtistWorkVO[]
reviews?: NailArtistReviewVO[]
availability?: NailArtistAvailabilityVO[]
}
export const nailArtistApi = {
getPublicProfile: async (artistId: IdType): Promise<NailArtistProfileVO> => {
return await api.get<NailArtistProfileVO>(`/nail-artist/profile/${artistId}`) as unknown as NailArtistProfileVO
},
getAvailability: async (artistId: IdType): Promise<NailArtistAvailabilityVO[]> => {
return await api.get<NailArtistAvailabilityVO[]>(`/nail-artist/${artistId}/availability`) as unknown as NailArtistAvailabilityVO[]
},
listReviews: async (artistId: IdType): Promise<NailArtistReviewVO[]> => {
return await api.get<NailArtistReviewVO[]>(`/nail-artist/${artistId}/reviews`) as unknown as NailArtistReviewVO[]
}
}