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

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

@@ -129,7 +129,7 @@
<view style="height: 100px;"></view>
<view class="btns">
<view class="btn" @click="toPinIndex">继续拼团</view>
<button class="btn main" @click="toOrderDetail(item)">查看订单</button>
<button class="btn main" @click="toOrderDetail(item)">查看订单</button>
</view>
</view>
</template>
@@ -165,7 +165,7 @@
</view>
<view class="u-m-t-16 u-flex u-col-center u-row-between">
<view style="max-width: 356rpx;">
<view class="font-bold" v-if="item.wareJson">{{item.wareJson
<view class="font-bold u-line-1" v-if="item.wareJson">{{item.wareJson
.wareName}}</view>
<view class="u-flex u-m-t-10 u-col-center ">
<view class="price">
@@ -227,7 +227,7 @@
</view>
</view>
<view class="u-flex u-row-center" v-if="item.status=='待成团'">
<view class="pin-btn" >邀请好友参团
<view class="pin-btn">邀请好友参团
<button open-type="share" class="share">邀请好友参团</button>
</view>
@@ -325,14 +325,36 @@
const item = reactive({})
function getDetail() {
Api.recordDetail(query).then(res => {
const wareJson = JSON.parse(res.wareJson)
wareJson.wareImgs = wareJson.wareImgs.split(',').filter(v => v)
res.wareJson = wareJson;
res.goodsImg = wareJson.wareImgs[0];
Object.assign(item, res)
console.log('item', item)
})
try {
Api.recordDetail(query).then(res => {
if (!res) {
uni.showModal({
title: '提示',
content :'当前商品已下架或者不存在',
showCancel: false,
success(res) {
uni.redirectTo({
url: '/groupBuying/index/index'
})
}
})
return
}
console.log(res, 'res')
const wareJson = JSON.parse(res.wareJson)
wareJson.wareImgs = wareJson.wareImgs.split(',').filter(v => v)
res.wareJson = wareJson;
res.goodsImg = wareJson.wareImgs[0];
Object.assign(item, res)
console.log('item', item)
})
} catch (err) {
console.log('err', err)
}
}
onLoad(init)
@@ -506,6 +528,7 @@
.item {
width: calc(100% / 3);
display: flex;
margin-bottom: 32rpx;
.add-box {
width: 140rpx;
@@ -525,9 +548,9 @@
}
}
&:nth-of-type(2n) {
justify-content: center;
}
// &:nth-of-type(2n) {
// justify-content: center;
// }
&:nth-of-type(3n) {
justify-content: flex-end;
@@ -601,7 +624,6 @@
border: 2rpx solid #E8AD7B;
background: #E8AD7B;
color: #fff;
margin-top: 32rpx;
position: relative;
.share {
@@ -736,12 +758,14 @@
.list {
display: flex;
flex-wrap: wrap;
}
.item {
width: calc(100% / 3);
display: flex;
.add-box {
width: 140rpx;
height: 140rpx;
@@ -760,7 +784,7 @@
}
}
&:nth-of-type(2n) {
&:nth-of-type(3n-1) {
justify-content: center;
}