From 1539850f9674de35cead85936930f0edd2ad30c2 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 18 Dec 2025 17:05:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/look-qrcode/look-qrcode.vue | 41 ++
components/modal.vue | 97 ++++
groupBuying/components/status.vue | 13 +-
groupBuying/confirm-order/confirm-order.vue | 251 +++++++++
groupBuying/detail/index.vue | 74 ++-
groupBuying/goodsDetail/goodsDetail.vue | 37 +-
groupBuying/index/index.vue | 85 ++-
groupBuying/success/index.vue | 543 +++++++++++++++-----
pages.json | 9 +-
pages/index/indexs.vue | 7 +-
10 files changed, 986 insertions(+), 171 deletions(-)
create mode 100644 components/look-qrcode/look-qrcode.vue
create mode 100644 components/modal.vue
create mode 100644 groupBuying/confirm-order/confirm-order.vue
diff --git a/components/look-qrcode/look-qrcode.vue b/components/look-qrcode/look-qrcode.vue
new file mode 100644
index 0000000..fbe4b46
--- /dev/null
+++ b/components/look-qrcode/look-qrcode.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ {{ qrcode }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/modal.vue b/components/modal.vue
new file mode 100644
index 0000000..5d90202
--- /dev/null
+++ b/components/modal.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/groupBuying/components/status.vue b/groupBuying/components/status.vue
index 8ce3dfd..fb84b5d 100644
--- a/groupBuying/components/status.vue
+++ b/groupBuying/components/status.vue
@@ -1,5 +1,5 @@
- {{status}}
+ {{status}}
+
+
\ No newline at end of file
diff --git a/groupBuying/detail/index.vue b/groupBuying/detail/index.vue
index 83351d7..dab78d4 100644
--- a/groupBuying/detail/index.vue
+++ b/groupBuying/detail/index.vue
@@ -1,13 +1,13 @@
-
+
-
+
剩余成团时间:
{{returnNum(0)}}
@@ -25,7 +25,7 @@
{{item.groupPeopleNum}}人团
-
+
@@ -51,7 +51,7 @@
已申请退款,需等待商家审核
-
+
@@ -89,7 +89,7 @@
-
+
@@ -101,7 +101,7 @@
-
+
立即参与拼团
@@ -140,9 +140,17 @@
-
- 申请退款
-
+
+
+ 申请退款
+
+
+
+ 申请退款
+
+
+ 取消退款
+
@@ -167,6 +175,15 @@
}
+ const canRefundStatus = ['待成团', '待核销']
+
+ function canRefund(item) {
+ if (canRefundStatus.includes(item.status)) {
+ return true
+ }
+ return false
+ }
+
const topStyle = {
backgroundImage: 'url(' + imgs.bg + ')'
}
@@ -251,6 +268,31 @@
})
}
+ function cancelRefund(item) {
+ uni.showModal({
+ title: '提示',
+ content: '是否取消退款?',
+ showCancel: true,
+ success(res) {
+ if (res.confirm) {
+ Api.cancelRefund({
+ recordId: item.id,
+ orderNo: item.orderNo,
+ }).then(res => {
+ if (res) {
+ uni.showToast({
+ title: '取消成功'
+ })
+ setTimeout(() => {
+ getDetail()
+ }, 1000)
+ }
+ })
+ }
+ }
+ })
+ }
+
let shareItem = null
function share(item) {
@@ -258,11 +300,13 @@
}
onShareAppMessage(() => {
console.log('onShareAppMessage')
+ console.log(shareItem)
+ const query = `groupOrderNo=${shareItem.groupOrderNo}&shopId=${shareItem.shopId}`
return wxShare({
title: shareItem.wareJson.wareName,
imageUrl: shareItem.goodsImg,
- query: `detailId=${shareItem.id}&shopId=${shareItem.shopId}`,
- type: 2,
+ path: '/groupBuying/detail/index' + '?' + query,
+ query,
})
})
@@ -285,7 +329,8 @@
.bottom {
margin: 0 28rpx;
transform: translateY(-160rpx);
-
+ border-radius: 16rpx;
+ overflow: hidden;
.time {
padding: 18rpx 24rpx;
background: #FFF4E2;
@@ -310,8 +355,7 @@
.goods {
background-color: #fff;
- padding: 22rpx 24rpx 0;
- border-radius: 0 0 16rpx 16rpx;
+ padding: 22rpx 24rpx ;
.pin {
width: 60rpx;
diff --git a/groupBuying/goodsDetail/goodsDetail.vue b/groupBuying/goodsDetail/goodsDetail.vue
index 55f7b71..e0a3532 100644
--- a/groupBuying/goodsDetail/goodsDetail.vue
+++ b/groupBuying/goodsDetail/goodsDetail.vue
@@ -182,6 +182,16 @@
return
}
if (step === '+') {
+ if(item.limitBuyNum==-10086){
+ number.value++
+ return
+ }
+ if(number.value>=item.limitBuyNum){
+ return uni.showToast({
+ title:'最多可购买'+item.limitBuyNum+'份',
+ icon:'none'
+ })
+ }
number.value++
return
}
@@ -234,6 +244,15 @@
}
async function payExchange() {
+ uni.setStorageSync('group_buying_order', {
+ ...item,
+ number: number.value,
+ groupOrderNo: popupData.item ? popupData.item.groupOrderNo : '',
+ })
+ uni.navigateTo({
+ url: '/groupBuying/confirm-order/confirm-order'
+ })
+ return
await dingyue();
uni.showLoading({
title: '支付中……'
@@ -244,8 +263,7 @@
Api.exchange({
paramId: item.id,
shopId: item.shopId,
- number: 1,
- price: item.extraPrice,
+ number: number.value,
groupOrderNo: popupData.item ? popupData.item.groupOrderNo : '',
openId
}).then(orderRes => {
@@ -255,7 +273,7 @@
if (res) {
uni.redirectTo({
- url: '/groupBuying/success/index?detailId=' + orderRes.goodsRecord
+ url: '/groupBuying/success/index?detailId=' + orderRes.record
.id
})
} else {
@@ -400,6 +418,19 @@
onLoad(init)
+ // #ifdef MP-WEIXIN
+ uni.showShareMenu()
+ // #endif
+ onShareAppMessage(() => {
+
+ const query = `wareId=${item.wareId}&shopId=${item.shopId}`
+ return wxShare({
+ title: item.wareJson.wareName,
+ imageUrl: item.goodsImg,
+ path: '/groupBuying/detail/index' + '?' + query,
+ query,
+ })
+ })
\ No newline at end of file
diff --git a/groupBuying/success/index.vue b/groupBuying/success/index.vue
index a65d478..299412f 100644
--- a/groupBuying/success/index.vue
+++ b/groupBuying/success/index.vue
@@ -1,145 +1,278 @@
-
-
-
-
- 拼团成功
-
+
+
+
+
-
-
- 可核销门店:
- {{item.shopName}}
-
-
- 门店地址:
- {{item.shopAddress}}
-
-
+
+
+
+ 拼团成功
+
-
-
-
-
-
-
-
- {{item.groupPeopleNum}}人团
+
+
+ 可核销门店:
+ {{item.shopName}}
+
+
+ 门店地址:
+ {{item.shopAddress}}
-
-
- {{item.wareJson
-.wareName}}
-
-
- ¥
- {{item.payAmount}}
+
+
+
+
+
+
+
+
+ {{item.groupPeopleNum}}人团
-
- ¥
- {{item.payAmount}}
+
+
+
+ {{item.wareJson
+ .wareName}}
+
+
+ ¥
+ {{item.payAmount}}
+
+
+ ¥
+ {{item.payAmount}}
+
+
+
+
+ 数量:{{item.num}}
-
- 数量:{{item.num}}
-
-
-
-
-
-
-
- {{item.verifyCode}}
-
-
-
-
+
+
+
+
+
+
+
+ 团长
+
-
-
-
-
-
-
-
-
-
-
- 团长
+
+ {{user.userName}}
- {{user.userName}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 等待参团
- 等待参团
+
+
+
+
+
+
+
+
+
+
+
+ 订单信息
+
+
+ {{showOrder?'收起':'展开'}}
+
+
+
-
-
+
+
+
+ 商品总额
+ ¥99.99
+
+
+ 实付金额
+ ¥{{item.payAmount}}
+
+
+ 订单号
+ {{item.orderNo}}
+
+
+ 支付时间
+ {{item.payTime}}
+
+
+
+
+
+
+ 继续拼团
+
+
-
-
-
-
-
-
- 订单信息
-
-
- {{showOrder?'收起':'展开'}}
-
-
+
+
+
+
+
+
+
+
+ 剩余成团时间:
+
+ {{returnNum(0)}}
+ :
+ {{returnNum(1)}}
+ :
+ {{returnNum(2)}}
+
+
+
+
+
+
+
+
+ {{item.groupPeopleNum}}人团
+
+
+
+
+
+
+ {{item.wareJson
+ .wareName}}
+
+
+ ¥
+ {{item.payAmount}}
+
+
+ ¥
+ {{item.payAmount}}
+
+
+
+
+ 数量:{{item.num}}
+
+
+
+
+
+
+
+
+ 可核销门店:
+ {{item.shopName}}
+
+
+ 门店地址:
+ {{item.shopAddress}}
+
+
+
+
+
+
+
+
+
+
+
+ 团长
+
+
+
+ {{user.userName}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 等待参团
+
+
+
+
+ 邀请好友参团
+
+
+
+
+
+
+
+
+ 订单信息
+
+
+ {{showOrder?'收起':'展开'}}
+
+
+
+
+
+
+
+
+ 商品总额
+ ¥99.99
+
+
+ 实付金额
+ ¥{{item.payAmount}}
+
+
+ 订单号
+ {{item.orderNo}}
+
+
+ 支付时间
+ {{item.payTime}}
+
+
+
+
+
+
+
-
-
- 商品总额
- ¥99.99
-
-
- 实付金额
- ¥{{item.payAmount}}
-
-
- 订单号
- {{item.orderNo}}
-
-
- 支付时间
- {{item.payTime}}
-
-
-
-
-
-
-
-
- 继续拼团
-
-
+