diff --git a/api/service.js b/api/service.js
index 70e5022..9cc8a30 100644
--- a/api/service.js
+++ b/api/service.js
@@ -192,4 +192,13 @@ export function getLuCouponPage(params = {}) {
})
}
+// 获得优惠卷详情
+export function getLuCouponDetail(id) {
+ return request({
+ url: '/app-api/member/lu-coupon/get',
+ method: 'GET',
+ data: { id },
+ })
+}
+
diff --git a/pages.json b/pages.json
index 03ef47e..19ae823 100644
--- a/pages.json
+++ b/pages.json
@@ -146,6 +146,13 @@
"navigationBarTitleText": "我的优惠卷",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "couponDetail",
+ "style": {
+ "navigationBarTitleText": "优惠卷详情",
+ "navigationStyle": "custom"
+ }
}
]
}
diff --git a/pages/profileSub/couponDetail.vue b/pages/profileSub/couponDetail.vue
new file mode 100644
index 0000000..c73ce8c
--- /dev/null
+++ b/pages/profileSub/couponDetail.vue
@@ -0,0 +1,403 @@
+
+
+
+
+
+
+
+
+
+ {{ (detail.discountPercent / 10).toFixed(1).replace(/\.0$/, '') }}
+ 折
+
+
+ ¥
+ {{ formatAmount(detail.discountAmount || detail.discountPrice || detail.price || 0) }}
+
+ 满{{ formatAmount(detail.usePrice) }}可用
+ 无门槛
+
+
+ {{ detail.name }}
+ 最多抵扣: ¥{{ formatAmount(detail.discountLimit) }}
+ 有效期至: {{ formatTimeStr(detail.validEndTime) }}
+
+ 已使用
+ 已过期
+ 已作废
+
+
+
+
+ 使用说明
+
+ 可用范围:
+ {{ detail.productScope === 1 ? '全部代金券通用' : '指定代金券可用' }}
+
+
+ 有效期限:
+ {{ formatTimeStr(detail.validStartTime) }} 至 {{ formatTimeStr(detail.validEndTime) }}
+
+
+
+
+
+ 可用代金卷
+
+
+
+
+ {{ item.name }}
+ 门店: {{ item.shopName }}
+
+
+ 库存:
+ {{ item.stock }}份
+
+
+ 使用规则:
+ {{ item.useRule }}
+
+
+ 有效天数:
+ {{ item.validDays }}天
+
+
+
+ ¥{{ formatAmount(item.salePrice || item.sellPrice) }}
+ ¥{{ formatAmount(item.originalPrice) }}
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/profileSub/myCoupons.vue b/pages/profileSub/myCoupons.vue
index 1651478..29e3685 100644
--- a/pages/profileSub/myCoupons.vue
+++ b/pages/profileSub/myCoupons.vue
@@ -61,6 +61,7 @@
v-for="(item, index) in coupons"
:key="index"
:class="{ disabled: isCouponDisabled(item) }"
+ @click="goToDetail(item)"
>
@@ -187,6 +188,11 @@ export default {
handleLoadMore() {
this.loadData();
},
+ goToDetail(item) {
+ uni.navigateTo({
+ url: `/pages/profileSub/couponDetail?id=${item.id}`
+ });
+ },
isCouponDisabled(item) {
return item.status === 1 || item.status === 2 || item.status === 3;
},