From 33e97284006a6c3cde3a420d75d518ddc0a702d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=BC=E8=B0=83main?= Date: Sat, 21 Mar 2026 19:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=8D=B7=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 7 +- api/service.js | 9 + pages.json | 7 + pages/detail/selectCoupon.vue | 253 ++++++++++++++++++++ pages/detail/serviceDetail.vue | 347 +++++++++++++++++++++++----- pages/profileSub/serviceRecords.vue | 8 +- 6 files changed, 564 insertions(+), 67 deletions(-) create mode 100644 pages/detail/selectCoupon.vue diff --git a/api/index.js b/api/index.js index 9c96459..52b383f 100644 --- a/api/index.js +++ b/api/index.js @@ -4,9 +4,9 @@ */ // 基础URL配置(注意:末尾不要加斜杠) -const BASE_URL = 'https://guangsh.manage.hschengtai.com' +// const BASE_URL = 'https://guangsh.manage.hschengtai.com' // const BASE_URL = 'http://192.168.0.97:48085' -// const BASE_URL = 'http://192.168.5.134:48085' +const BASE_URL = 'http://192.168.5.135:48085' // 是否正在刷新token(防止并发刷新) let isRefreshing = false // 等待刷新完成的请求队列 @@ -330,7 +330,8 @@ export function request(options = {}) { uni.showModal({ title: '提示', content: errorMsg, - showCancel: false, + showCancel: true, + cancelText: '取消', confirmText: '去登录', success: (modalRes) => { if (modalRes.confirm) { diff --git a/api/service.js b/api/service.js index 8eabceb..70e5022 100644 --- a/api/service.js +++ b/api/service.js @@ -183,4 +183,13 @@ export function cancelOrder(params = {}){ }) } +// 获得优惠卷分页 +export function getLuCouponPage(params = {}) { + return request({ + url: '/app-api/member/lu-coupon/page', + method: 'GET', + data: params, + }) +} + diff --git a/pages.json b/pages.json index 121d9c4..a14dafe 100644 --- a/pages.json +++ b/pages.json @@ -52,6 +52,13 @@ "navigationStyle": "custom" } }, + { + "path": "selectCoupon", + "style": { + "navigationBarTitleText": "选择优惠卷", + "navigationStyle": "custom" + } + }, { "path": "mapDetail", "style": { diff --git a/pages/detail/selectCoupon.vue b/pages/detail/selectCoupon.vue new file mode 100644 index 0000000..659fbea --- /dev/null +++ b/pages/detail/selectCoupon.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/pages/detail/serviceDetail.vue b/pages/detail/serviceDetail.vue index f6c4b13..9bd57c8 100644 --- a/pages/detail/serviceDetail.vue +++ b/pages/detail/serviceDetail.vue @@ -101,22 +101,27 @@ - - 总金额¥ - {{ totalAmount.toFixed(2) }} - - - {{ memberLevelName }}优惠 + + + + 合计: + ¥ + {{ totalAmount.toFixed(2) }} + + + {{ memberLevelName }}优惠 + + + + {{ selectedCoupon ? '已优惠 ¥' + (calculateCouponDiscount(selectedCoupon) / 100).toFixed(2) : '选择优惠卷' }} + +