From 815457844d00513acfc4251757ef4b65fe1d2383 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 16 Dec 2023 12:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=BC=98=E6=83=A0=E5=8A=B5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=EF=BC=9A50%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupon/detail.vue | 648 +++++++++--------- sheep/api/promotion/coupon.js | 16 + .../s-coupon-list/s-coupon-list.vue | 7 +- 3 files changed, 354 insertions(+), 317 deletions(-) diff --git a/pages/coupon/detail.vue b/pages/coupon/detail.vue index 92318996..71ccbe05 100644 --- a/pages/coupon/detail.vue +++ b/pages/coupon/detail.vue @@ -1,350 +1,376 @@ \ No newline at end of file + .all-user { + width: 100%; + height: 300rpx; + font-size: 34rpx; + font-weight: bold; + color: #333333; + } + diff --git a/sheep/api/promotion/coupon.js b/sheep/api/promotion/coupon.js index 9ff66d2b..be8364e7 100644 --- a/sheep/api/promotion/coupon.js +++ b/sheep/api/promotion/coupon.js @@ -25,6 +25,14 @@ const CouponApi = { params, }); }, + // 获得优惠劵模版 + getCouponTemplate: (id) => { + return request({ + url: '/app-api/promotion/coupon-template/get', + method: 'GET', + params: { id }, + }); + }, // 我的优惠劵列表 getCouponPage: (params) => { return request({ @@ -41,6 +49,14 @@ const CouponApi = { data: { templateId }, }); }, + // 获得优惠劵 + getCoupon: (id) => { + return request({ + url: '/app-api/promotion/coupon/get', + method: 'GET', + params: { id }, + }); + }, }; export default CouponApi; \ No newline at end of file diff --git a/sheep/components/s-coupon-list/s-coupon-list.vue b/sheep/components/s-coupon-list/s-coupon-list.vue index bb7f8081..411a4c0e 100644 --- a/sheep/components/s-coupon-list/s-coupon-list.vue +++ b/sheep/components/s-coupon-list/s-coupon-list.vue @@ -80,12 +80,7 @@ import { fen2yuan } from '../../hooks/useGoods'; import sheep from '../../index'; - const state = reactive({ - stateMap: { - 0: '立即领取', - 1: '去使用', - }, - }); + const state = reactive({}); const isDisable = computed(() => { if (props.type === 'coupon') {