feat:礼物管理

This commit is contained in:
dzc committed 2025-11-10 16:07:02 +08:00
1 parent 8b0b3bec3a
commit e938f9bd1e
4 files changed
+364

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
import request from '@/config/axios'
// 礼物商品 VO
export interface GiftVO {
id: number // 礼物商品id
title: number // 礼物标题
price: number // 礼物价格(分)
image: string // 礼物图片
status: string // 礼物状态
}
// 礼物商品 API
export const GiftApi = {
// 查询礼物商品分页
getGiftPage: async (params: any) => {
return await request.get({ url: `/trade/gift/page`, params })
},
// 查询礼物商品详情
getGift: async (id: number) => {
return await request.get({ url: `/trade/gift/get?id=` + id })
},
// 新增礼物商品
createGift: async (data: GiftVO) => {
return await request.post({ url: `/trade/gift/create`, data })
},
// 修改礼物商品
updateGift: async (data: GiftVO) => {
return await request.put({ url: `/trade/gift/update`, data })
},
// 删除礼物商品
deleteGift: async (id: number) => {
return await request.delete({ url: `/trade/gift/delete?id=` + id })
},
// 导出礼物商品 Excel
exportGift: async (params) => {
return await request.download({ url: `/trade/gift/export-excel`, params })
}
}