完成JC-ArtList与JC-Salon端侧清理和统一命名
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
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 NailArtistListItemVO {
|
||||
id?: IdType
|
||||
userId?: IdType
|
||||
identity?: string
|
||||
experience?: number
|
||||
skills?: string
|
||||
rating?: number | string
|
||||
status?: number
|
||||
participateProduction?: number
|
||||
workStartTime?: string
|
||||
workEndTime?: string
|
||||
userType?: number
|
||||
userTypeName?: string
|
||||
portfolio?: string
|
||||
nickname?: string
|
||||
shopId?: IdType
|
||||
shopName?: string
|
||||
signature?: 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[]
|
||||
},
|
||||
listByShopId: async (shopId: IdType): Promise<NailArtistListItemVO[]> => {
|
||||
return await api.get<NailArtistListItemVO[]>(`/nail-artist/list/shop/${shopId}`) as unknown as NailArtistListItemVO[]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user