拼团问题修复,增加套餐功能

This commit is contained in:
2025-12-19 15:18:33 +08:00
parent 9ea8a2a7ab
commit cd199c980f
15 changed files with 2517 additions and 682 deletions

View File

@@ -1,7 +1,7 @@
<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"
<up-navbar bg-color="transparent" :fixed="false" :placeholder="false" :title="title" left-icon-color="#fff"
@leftClick="back('/groupBuying/index/index')" title-color="#fff"></up-navbar>
<view class="u-flex info u-col-center">
</view>
@@ -26,7 +26,7 @@
<text class="">{{item.groupPeopleNum}}人团</text>
</view>
<template v-if="item.id">
<statusVue :status="item.wareGroupStatus=='ing'?'待成团': item.status"></statusVue>
<statusVue :status="item.status"></statusVue>
</template>
<template v-else>
<statusVue v-if="item.wareGroupStatus=='ing'" status="待成团"></statusVue>
@@ -36,7 +36,7 @@
</view>
<view class="u-m-t-16 u-flex u-col-center">
<view style="width: 356rpx;">
<view class="font-bold" v-if="item&&item.wareJson">{{item.wareJson
<view class="font-bold u-line-1" v-if="item&&item.wareJson">{{item.wareJson
.wareName}}</view>
<view class="u-flex u-m-t-10 u-col-center ">
<view class="price">
@@ -57,7 +57,7 @@
</view>
<view class="refund" v-if="item.status=='退款中'">已申请退款需等待商家审核</view>
<view class="shop-box" >
<view class="shop-box">
<view class="u-flex u-row-center u-flex-col u-col-center" v-if="item.status=='待核销'||item.status=='退款中'">
<up-qrcode :val="item.verifyCode" :size="104"></up-qrcode>
<view class="u-flex u-m-t-22 u-m-b-18 u-col-center">
@@ -79,8 +79,8 @@
</view>
</view>
<view class="members">
<view class="list" v-if="item.users&&item.users.length">
<view class="members" v-if="item.status!='已退款'">
<view class="list" v-if="item.users&&item.users.length">
<view class="item" v-for="(user,index) in item.users" :key="index">
<view class="box">
<view class="u-flex relative">
@@ -140,7 +140,8 @@
<view class="color-666">支付时间</view>
<view class="">{{item.payTime}}</view>
</view>
<view class="u-flex u-row-between item" v-if="item.groupEndTime&&item.status=='待核销'">
<view class="u-flex u-row-between item"
v-if="item.groupEndTime&&item.wareGroupStatus=='success'">
<view class="color-666">成团时间</view>
<view class="">{{item.groupEndTime}}</view>
</view>
@@ -182,7 +183,8 @@
<image class="cover" :src="item.goodsImg"></image>
<view class="u-flex u-flex-1 u-row-between u-p-l-16 u-col-center">
<view style="max-width: 340rpx;">
<view class="u-font-32 font-bold" v-if="item && item.wareJson">{{item.wareJson.wareName}}</view>
<view class="u-font-32 font-bold u-line-1" v-if="item && item.wareJson">
{{item.wareJson.wareName}}</view>
<view class="u-m-t-12 color-666 u-line-2">{{item.wareJson.wareDetail}}</view>
</view>
@@ -221,6 +223,10 @@
</template>
<script setup>
import {
Storelogin
} from '@/stores/user.js';
const storelogin = Storelogin();
import {
back
} from '@/utils/uniapp.js'
@@ -291,11 +297,11 @@
...item,
...item.wareJson,
number: number.value,
id:item.wareId||'',
originalPrice:item.wareOriginalPrice,
groupPrice:item.wareGroupPrice,
wareImgs:item.wareJson.wareImgs.join(','),
groupOrderNo: item.groupOrderNo||'',
id: item.wareId || '',
originalPrice: item.wareOriginalPrice,
groupPrice: item.wareGroupPrice,
wareImgs: item.wareJson.wareImgs.join(','),
groupOrderNo: item.groupOrderNo || '',
})
uni.navigateTo({
url: '/groupBuying/confirm-order/confirm-order'
@@ -330,7 +336,7 @@
detailId: '',
})
function init(opt) {
async function init(opt) {
// 获取小程序进入场景和参数
const launchOptions = uni.getLaunchOptionsSync();
console.log(launchOptions);
@@ -341,6 +347,7 @@
console.log(opt)
Object.assign(query, opt)
console.log(query)
await storelogin.actionslogin()
getDetail()
}
const item = reactive({})
@@ -353,19 +360,19 @@
res.goodsImg = wareJson.wareImgs[0];
Object.assign(item, res)
console.log('item', item)
uni.cache.set('shopId',item.shopId)
if(!item.id&& item.wareGroupStatus!='ing'){
uni.cache.set('shopId', item.shopId)
if (!item.id && item.wareGroupStatus != 'ing') {
uni.showModal({
title:'提示',
content:'拼团已结束',
showCancel:false,
title: '提示',
content: '拼团已结束',
showCancel: false,
success() {
uni.redirectTo({
url:'/groupBuying/index/index',
url: '/groupBuying/index/index',
})
}
})
return
return
}
})
}
@@ -453,6 +460,13 @@
query,
})
})
const title=computed(()=>{
if(!item.id&&item.wareGroupStatus=='ing'){
return '拼团特惠'
}
return '订单详情'
})
</script>
<style lang="scss" scoped>
@@ -559,11 +573,13 @@
.list {
display: flex;
flex-wrap: wrap;
}
.item {
width: calc(100% / 3);
display: flex;
margin-bottom: 32rpx;
.add-box {
width: 140rpx;
@@ -583,7 +599,7 @@
}
}
&:nth-of-type(2n) {
&:nth-of-type(3n-1) {
justify-content: center;
}
@@ -682,63 +698,63 @@
font-weight: 700;
margin-bottom: 32rpx;
}
.popup-content {
font-size: 28rpx;
min-height: 300px;
.popup-content-top {
padding: 32rpx 28rpx;
border-bottom: 1px solid #ededed;
}
.goods-info {
padding: 32rpx 28rpx;
border-bottom: 1px solid #ededed;
.cover {
width: 184rpx;
height: 184rpx;
border-radius: 16rpx;
background: #d9d9d9;
&.bg-fff {
background-color: #fff;
}
}
.price {
font-size: 32rpx;
font-weight: 700;
color: #ed5a2e;
line-height: 46rpx;
}
.old-price {
font-size: 32rpx;
color: #999;
text-decoration-line: line-through;
line-height: 48rpx;
}
.limitBuyNum {
color: #666;
line-height: 42rpx;
}
}
.popup-content-bottom {
padding: 20rpx;
border-bottom: 1px solid #ededed;
.price {
color: #ed5a2e;
font-size: 32rpx;
font-weight: 700;
}
}
.btn {
display: flex;
padding: 22rpx 214rpx;