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 @@
+
+
+
+
+
+
+
+
+
+ {{ (item.discountPercent / 10).toFixed(1).replace(/\.0$/, '') }}
+ 折
+
+
+
+ ¥
+
+ {{ formatAmount(item.discountAmount || item.discountPrice || item.price || 0) }}
+
+
+
+ 满{{ formatAmount(item.usePrice) }}可用
+
+
+ 无门槛
+
+
+
+ {{ item.name }}
+ 最多抵扣: ¥{{ formatAmount(item.discountLimit) }}
+ 有效期至: {{ formatTimeStr(item.validEndTime) }}
+
+
+
+
+
+ 暂无优惠卷
+
+
+
+
+
+
+
+
+
+
+
+
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 @@