功能:更新消息中心和 YumiNail 模块
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
import api from './index'
|
||||
import type { IdType } from '@/utils/id'
|
||||
|
||||
export interface ShopVO {
|
||||
id: IdType
|
||||
shopName: string
|
||||
description: string
|
||||
address: string
|
||||
businessHours: string
|
||||
status?: number
|
||||
coverImageFileId?: string
|
||||
coverImageUrls?: string[]
|
||||
imageFileIds: string
|
||||
imageUrls?: string[]
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export interface ShopSimpleVO {
|
||||
id: string | number
|
||||
shopName?: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
export interface ListShopsParams {
|
||||
page: number
|
||||
size: number
|
||||
keyword?: string
|
||||
}
|
||||
|
||||
export interface CreateShopRequest {
|
||||
name: string
|
||||
description: string
|
||||
image: string
|
||||
phone: string
|
||||
address: string
|
||||
businessHours: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export interface UpdateShopRequest {
|
||||
name?: string
|
||||
description?: string
|
||||
image?: string
|
||||
phone?: string
|
||||
address?: string
|
||||
businessHours?: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
export const shopApi = {
|
||||
getAllShops: async (): Promise<ShopVO[]> => {
|
||||
return await api.get<ShopVO[]>('/shop/list/all') as unknown as ShopVO[]
|
||||
},
|
||||
|
||||
getPublicShops: async (): Promise<ShopVO[]> => {
|
||||
return await api.get<ShopVO[]>('/shop/list/public') as unknown as ShopVO[]
|
||||
},
|
||||
|
||||
getShopsSimple: async (): Promise<ShopSimpleVO[]> => {
|
||||
return await api.get<ShopSimpleVO[]>('/shop/list/simple') as unknown as ShopSimpleVO[]
|
||||
},
|
||||
|
||||
getShopById: async (id: IdType): Promise<ShopVO> => {
|
||||
return await api.get<ShopVO>(`/shop/get/${id}`) as unknown as ShopVO
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user