Files
JayuCloud/Frontend/src/api/shop.ts
T

31 lines
550 B
TypeScript
Raw Normal View History

2026-02-24 09:59:22 +08:00
import api from './index'
export interface ShopVO {
id: number
shopName: string
address: string
phone: string
businessHours: string
description: string
createTime: string
updateTime: string
}
export interface ShopSimpleVO {
id: number
shopName: string
}
export const shopApi = {
getAllShops: () => {
return api.get<ShopVO[]>('/shop/list/all')
},
getShopsSimple: () => {
return api.get<ShopSimpleVO[]>('/shop/list/simple')
},
getShopById: (id: number) => {
return api.get<ShopVO>(`/shop/get/${id}`)
}
}