拼团修复

This commit is contained in:
2025-12-18 17:05:43 +08:00
parent 2285c796aa
commit 1539850f96
10 changed files with 986 additions and 171 deletions

View File

@@ -1,13 +1,13 @@
<template>
<view class="min-page bg-f7 color-333 u-font-28 relative">
<view class="top" :style="topStyle">
<up-navbar bg-color="transparent" :fixed="false" :placeholder="false" title="订单详情" left-icon-color="#fff" @leftClick="uni.navigateBack()"
title-color="#fff"></up-navbar>
<up-navbar bg-color="transparent" :fixed="false" :placeholder="false" title="订单详情" left-icon-color="#fff"
@leftClick="uni.navigateBack()" title-color="#fff"></up-navbar>
<view class="u-flex info u-col-center">
</view>
</view>
<view class="bottom">
<view class="time">
<view class="time" v-if="item.status=='待成团'">
<text class="color-666">剩余成团时间</text>
<view class="u-font-32">
<text class="number">{{returnNum(0)}}</text>
@@ -25,7 +25,7 @@
<image :src="imgs.pin" class="pin" mode=""></image>
<text class="">{{item.groupPeopleNum}}人团</text>
</view>
<statusVue></statusVue>
<statusVue :status="item.status"></statusVue>
</view>
<view class="u-m-t-16 u-flex u-col-center">
@@ -51,7 +51,7 @@
</view>
<view class="refund" v-if="item.status=='待退款'">已申请退款需等待商家审核</view>
<view class="shop-box">
<view class="shop-box" v-if="item.status=='待核销'">
<view class="u-flex u-row-center u-flex-col u-col-center">
<up-qrcode :val="item.verifyCode" :size="104"></up-qrcode>
<view class="u-flex u-m-t-22 u-m-b-18 u-col-center">
@@ -89,7 +89,7 @@
</view>
<view class="item">
<view class="item" v-if="item.status=='待成团'">
<view class="box">
<view class="u-flex relative">
<view class="add-box u-flex u-row-center">
@@ -101,7 +101,7 @@
</view>
</view>
</view>
<view class="u-flex u-row-center">
<view class="u-flex u-row-center" v-if="item.status=='待成团'&&!item.id">
<view class="pin-btn">立即参与拼团</view>
</view>
</view>
@@ -140,9 +140,17 @@
</view>
</view>
<view style="height: 100px;"></view>
<view class="btns">
<view class="btn" @click="refund(item)">申请退款</view>
<button open-type="share" class="btn main" @click="share(item)">邀请好友</button>
<view class="btns" v-if="item.id">
<template v-if="item.status=='待成团'">
<view class="btn" @click="refund(item)" v-if="canRefund(item)">申请退款</view>
<button open-type="share" class="btn main" @click="share(item)">邀请好友</button>
</template>
<template v-if="item.status=='待核销'">
<view class="btn" @click="refund(item)" v-if="canRefund(item)">申请退款</view>
</template>
<template v-if="item.status=='待退款'">
<view class="btn" @click="cancelRefund(item)">取消退款</view>
</template>
</view>
</view>
</template>
@@ -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,
})
})
</script>
@@ -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;