diff --git a/src/api/mall/product/gift.ts b/src/api/mall/product/gift.ts new file mode 100644 index 00000000..cd75dffa --- /dev/null +++ b/src/api/mall/product/gift.ts @@ -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 }) + } +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b13857dd..3f93d1a9 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -172,6 +172,7 @@ export enum DICT_TYPE { // ========== MALL - 商品模块 ========== PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 + PRODUCT_GIFT_STATUS = 'product_gift_status', // 礼物商品状态 // ========== MALL - 交易模块 ========== EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 diff --git a/src/views/mall/product/gift/GiftForm.vue b/src/views/mall/product/gift/GiftForm.vue new file mode 100644 index 00000000..9821a26a --- /dev/null +++ b/src/views/mall/product/gift/GiftForm.vue @@ -0,0 +1,155 @@ + + \ No newline at end of file diff --git a/src/views/mall/product/gift/index.vue b/src/views/mall/product/gift/index.vue new file mode 100644 index 00000000..0cd68883 --- /dev/null +++ b/src/views/mall/product/gift/index.vue @@ -0,0 +1,165 @@ + + + \ No newline at end of file