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 @@
-
-
-
-
-
-
-
-
-
- {{ state.list.name }}
- 满{{ state.list.enough }}减{{ state.list.amount }}
-
-
-
- 领取时间:{{ state.list.get_start_time }}至{{ state.list.get_end_time }}
-
-
- 有效期:{{ state.list.use_start_time }}至{{ state.list.use_end_time }}
-
-
-
-
-
- 优惠券类型
- {{ state.list.type_text }}
-
-
-
-
- {{ state.list.description }}
-
-
-
-
-
-
-
-
- {{ state.list.use_scope_text }}
-
+
+
+
+
+
+
+
+
+
+ {{ state.coupon.name }}
+
+ 满 {{ fen2yuan(state.coupon.usePrice) }} 元,
+ {{ state.coupon.discountType === 1
+ ? '减 ' + fen2yuan(state.coupon.discountPrice) + ' 元'
+ : '打 ' + state.coupon.discountPercent / 10.0 + ' 折' }}
+
+
+
+ 有效期:领取后 {{ state.coupon.fixedEndTerm }} 天内可用
+
+
+ 有效期: {{ sheep.$helper.timeFormat(state.coupon.validStartTime, 'yyyy-mm-dd') }} 至
+ {{ sheep.$helper.timeFormat(state.coupon.validEndTime, 'yyyy-mm-dd') }}
+
+
+
+
+
+ 优惠券类型
+ {{ state.coupon.discountType === 1 ? '满减券' : '折扣券' }}
+
+
+
+
+
+ {{ state.coupon.description }}
+
+
+
+
+
+
-
- {{ state.list.use_scope_text }}
-
-
-
-
-
+ {{ state.list.use_scope_text }}
+
+
+
+ {{ state.list.use_scope_text }}
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+ }"
+ @tap="loadMore"
+ />
+
+
+
+
\ 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') {