From 63b30c0695e84cc0d9376cea19223872d897c766 Mon Sep 17 00:00:00 2001 From: Waiting Date: Tue, 11 Jun 2024 23:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=AD=E4=B9=B0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=9B=A2=E8=B4=AD=E5=88=B8=E4=B8=8D=E5=88=B0=E5=B8=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/groupbuy/index.ts | 2 + src/pages/common/groupbuy/detail.vue | 6 +-- src/pages/common/groupbuy/order-confirm.vue | 2 +- .../common/groupbuy/order-coupon-confirm.vue | 53 ++++++++++++++----- src/pages/home/index.vue | 2 +- src/pages/mall/subs/order/order-confirm.vue | 6 +-- .../subs/coupon/components/coupon-item.vue | 2 +- src/pages/mine/subs/order/detail.vue | 2 +- src/pages/mine/subs/recharge/index.vue | 4 +- src/utils/order/index.ts | 19 ++++--- 10 files changed, 65 insertions(+), 33 deletions(-) diff --git a/src/api/groupbuy/index.ts b/src/api/groupbuy/index.ts index 373ac18..4b01cb7 100644 --- a/src/api/groupbuy/index.ts +++ b/src/api/groupbuy/index.ts @@ -29,3 +29,5 @@ export const progress = (data: any) => post({ url: 'wechat/coupons/group/pa export const pay = (data: any) => post({ url: 'wechat/coupons/group/pay', data }); +export const couponPay = (data: any) => post({ url: 'wechat/coupons/pay', data }); + diff --git a/src/pages/common/groupbuy/detail.vue b/src/pages/common/groupbuy/detail.vue index e0fcf55..3b24dc5 100644 --- a/src/pages/common/groupbuy/detail.vue +++ b/src/pages/common/groupbuy/detail.vue @@ -8,7 +8,7 @@ {{ swiperIndex + 1 }} - /{{ bannerList.length }} + /{{ bannerList?.length || 0 }} @@ -112,7 +112,7 @@ - + 跟团记录 @@ -241,7 +241,7 @@ const isEnded = () => { const getStockColorCount = computed(() => { const list = Array.from(new Set(groupBuyBean.value?.goods?.stocks?.map(item => item.colorName))) .map(colorName => groupBuyBean.value?.goods?.stocks?.find(item => item.colorName === colorName)!); - return list.length; + return (list?.length)||0; }); const fetchRecommendList = async () => { diff --git a/src/pages/common/groupbuy/order-confirm.vue b/src/pages/common/groupbuy/order-confirm.vue index 9fa07b5..0b0c11d 100644 --- a/src/pages/common/groupbuy/order-confirm.vue +++ b/src/pages/common/groupbuy/order-confirm.vue @@ -80,7 +80,7 @@ const buildSqbParams = computed(() => { const navigateTo = (e: any) => { handlePayResult(orderBean.value?.id, e, { - onSuccess: () => { + onSuccess: (options:any) => { showToast('支付成功', { icon: 'success', complete: () => { diff --git a/src/pages/common/groupbuy/order-coupon-confirm.vue b/src/pages/common/groupbuy/order-coupon-confirm.vue index 08ad7c0..94dbe09 100644 --- a/src/pages/common/groupbuy/order-coupon-confirm.vue +++ b/src/pages/common/groupbuy/order-coupon-confirm.vue @@ -2,7 +2,7 @@ - + {{ groupBuyBean?.name || groupBuyBean?.title }} {{ groupBuyBean?.startDate }}至{{ groupBuyBean?.endDate }} @@ -49,7 +49,7 @@