diff --git a/Frontend/src/api/admin.ts b/Frontend/src/api/admin.ts index a7e749f7..6ede020f 100644 --- a/Frontend/src/api/admin.ts +++ b/Frontend/src/api/admin.ts @@ -160,4 +160,46 @@ export const adminProductApi = { } } +export interface Shop { + id: number + shopName: string + description: string + address: string + businessHours: string + coverImageFileId: string + coverImageUrl?: string + createTime: string + updateTime: string +} + +export interface ShopListResponse { + list: Shop[] + total: number + page: number + size: number +} + +export interface CreateShopRequest { + shopName: string + description: string + address: string + businessHours: string + coverImageFileId: string +} + +export const adminShopApi = { + listShops: (params: { page: number; size: number; keyword?: string }) => { + return adminApi.get('/admin/shops/list', { params }) + }, + createShop: (data: CreateShopRequest) => { + return adminApi.post('/admin/shops/create', data) + }, + updateShop: (id: number, data: CreateShopRequest) => { + return adminApi.put(`/admin/shops/update/${id}`, data) + }, + deleteShop: (id: number) => { + return adminApi.delete(`/admin/shops/delete/${id}`) + } +} + export default adminApi diff --git a/Frontend/src/views/admin/ShopsView.vue b/Frontend/src/views/admin/ShopsView.vue index 2771d560..d3b0063e 100644 --- a/Frontend/src/views/admin/ShopsView.vue +++ b/Frontend/src/views/admin/ShopsView.vue @@ -33,15 +33,10 @@ -