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 @@ + + + + + \ 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; },