后台管理页面初版

This commit is contained in:
xiaowang
2026-02-25 10:37:16 +08:00
parent f946f9d31a
commit efe172793c
42 changed files with 3338 additions and 459 deletions
+50 -6
View File
@@ -2,18 +2,46 @@ import api from './index'
export interface ShopVO {
id: number
shopName: string
address: string
phone: string
businessHours: string
name: string
description: string
image: string
phone: string
address: string
businessHours: string
status: number
createTime: string
updateTime: string
}
export interface ShopSimpleVO {
id: 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 = {
@@ -27,5 +55,21 @@ export const shopApi = {
getShopById: (id: number) => {
return api.get<ShopVO>(`/shop/get/${id}`)
},
listShops: (params: ListShopsParams) => {
return api.get<any>('/admin/shop/list', { params })
},
createShop: (data: CreateShopRequest) => {
return api.post('/admin/shop/create', data)
},
updateShop: (id: number, data: UpdateShopRequest) => {
return api.put(`/admin/shop/update/${id}`, data)
},
deleteShop: (id: number) => {
return api.delete(`/admin/shop/delete/${id}`)
}
}
}