From e938f9bd1e1e6ec02c4283c374a6459f0e49b3cc Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 10 Nov 2025 16:07:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=A4=BC=E7=89=A9=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/product/gift.ts | 43 ++++++ src/utils/dict.ts | 1 + src/views/mall/product/gift/GiftForm.vue | 155 +++++++++++++++++++++ src/views/mall/product/gift/index.vue | 165 +++++++++++++++++++++++ 4 files changed, 364 insertions(+) create mode 100644 src/api/mall/product/gift.ts create mode 100644 src/views/mall/product/gift/GiftForm.vue create mode 100644 src/views/mall/product/gift/index.vue 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