功能:完善多店铺登录与首次部署SQL
This commit is contained in:
@@ -6,6 +6,7 @@ export interface ShopVO {
|
||||
description: string
|
||||
address: string
|
||||
businessHours: string
|
||||
status?: number
|
||||
imageFileIds: string
|
||||
imageUrls?: string[]
|
||||
createTime: string
|
||||
@@ -45,15 +46,19 @@ export interface UpdateShopRequest {
|
||||
}
|
||||
|
||||
export const shopApi = {
|
||||
getAllShops: () => {
|
||||
return api.get<ShopVO[]>('/shop/list/all')
|
||||
getAllShops: async (): Promise<ShopVO[]> => {
|
||||
return await api.get<ShopVO[]>('/shop/list/all') as unknown as ShopVO[]
|
||||
},
|
||||
|
||||
getShopsSimple: () => {
|
||||
return api.get<ShopSimpleVO[]>('/shop/list/simple')
|
||||
getPublicShops: async (): Promise<ShopVO[]> => {
|
||||
return await api.get<ShopVO[]>('/shop/list/public') as unknown as ShopVO[]
|
||||
},
|
||||
|
||||
getShopById: (id: number) => {
|
||||
return api.get<ShopVO>(`/shop/get/${id}`)
|
||||
getShopsSimple: async (): Promise<ShopSimpleVO[]> => {
|
||||
return await api.get<ShopSimpleVO[]>('/shop/list/simple') as unknown as ShopSimpleVO[]
|
||||
},
|
||||
|
||||
getShopById: async (id: number): Promise<ShopVO> => {
|
||||
return await api.get<ShopVO>(`/shop/get/${id}`) as unknown as ShopVO
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user