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') {