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

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

@@ -39,23 +39,20 @@
<view class="item" v-for="(item,index) in list" :key="index" @click="toDetail(item)">
<view class="relative img-box">
<up-image width="218rpx" radius="16rpx" height="218rpx" :src="returnCoverImg(item)"></up-image>
<view class="tag">阶梯优惠</view>
<view class="tag" v-if="item.tieredDiscount&&item.tieredDiscount.length">阶梯优惠</view>
</view>
<view class="u-flex-1 u-p-l-16">
<view class="u-line-1 name">这里是商品名称啊啊嗷嗷啊啊</view>
<view class="desc">
<view class="u-flex-1 u-p-l-16" style="max-width: 416rpx;">
<view class="u-line-1 name">{{item.packageName}}</view>
<view class="desc u-line-1 u-m-t-10">
{{item.description}}
</view>
<view class="info">
<view class="left">
<view class="">
<text class="u-font-24">拼团到手</text>
<text class="u-font-32 font-bold"> ¥{{item.groupPrice}}</text>
</view>
<view style="opacity: 0.84;">
<text class="u-font-24">原价</text>
<text class=""> ¥{{item.originalPrice}}</text>
</view>
<view class="sale-number">已售{{item.saleNum||0}}</view>
<view class="info ">
<view class="left u-flex u-col-center">
<text class="u-font-24">最低到手</text>
<text class="u-font-32 font-bold"> ¥{{item.price}}</text>
<text class="color-999 old-price"> ¥{{item.originPrice}}</text>
</view>
<view class="right">
<image class="pin" :src="imgs.pin"></image>
@@ -146,6 +143,10 @@
watch
} from 'vue'
import {
APIusershopInfodetail
} from '@/common/api/member.js'
const canRefundStatus = ['待成团', '待核销']
function canRefund(item) {
@@ -168,7 +169,7 @@
bg: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/dd298d6a503d432f832f3c7c2bb7fb0e.png',
bg1: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/1/604c3f917daa41af9239145196c6d3f3.png',
map: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/1/0a293f6e1a6a4e7b956379a5b6701104.png',
pin: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/3/4bcce5bdfa074f2a838a0209fac24241.png'
pin: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/8eaf3bdd44ce422889e5feeb30bcb2ea.png'
}
const shopInfo = ref(uni.cache.get('shopInfo'))
@@ -245,7 +246,7 @@
size,
shopId
} = query
Api.record({
Api.order({
page,
size,
shopId,
@@ -275,23 +276,22 @@
function toDetail(item) {
uni.navigateTo({
url: '/groupBuying/goodsDetail/goodsDetail?wareId=' + item.id + '&shopId=' + item.shopId
url: '/userPackage/goodsDetail/goodsDetail?id=' + item.id + '&shopId=' + item.shopId
})
}
function toOrderDetail(item) {
uni.navigateTo({
url: '/groupBuying/detail/index?detailId=' + item.id + '&shopId=' + item.shopId
url: '/userPackage/detail/index?detailId=' + item.id + '&shopId=' + item.shopId
})
}
function returnCoverImg(item) {
if (!item.wareImgs) {
if (!item.images) {
return ''
}
const arr = item.wareImgs.split(',')
return arr[0]
return item.images[0]
}
function refresh() {
@@ -393,6 +393,17 @@
query,
})
})
onLoad(() => {
APIusershopInfodetail({
shopId: uni.cache.get('shopId')
}).then(res => {
console.log(res);
shopInfo.value = res.shopInfo
uni.cache.set('shopInfo', res.shopInfo)
})
})
onShow(getData)
@@ -477,10 +488,11 @@
.img-box {
position: relative;
.tag {
position: absolute;
left:0;
top:0;
left: 0;
top: 0;
padding: 8rpx 18rpx;
border-radius: 16rpx 0;
background: #4C2828;
@@ -488,11 +500,20 @@
font-size: 700;
}
}
.name{
font-size: 32rpx;font-weight: 700; color: #333333;
.name {
font-size: 32rpx;
font-weight: 700;
color: #333333;
}
.desc{
.desc {
color: #666;
}
.sale-number {
margin-top: 16rpx;
color: #999;
}
.numbers {
@@ -520,19 +541,22 @@
}
.info {
background-image: url(https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/1/604c3f917daa41af9239145196c6d3f3.png);
width: 410rpx;
height: 102rpx;
background: linear-gradient(270deg, #FFF7F4 44.8%, #ffffff00 89.37%);
width: 452rpx;
height: 92rpx;
border-radius: 12rpx;
background-size: cover;
transform: translateY(-10rpx);
display: flex;
.left {
width: 306rpx;
color: #fff;
padding: 16rpx 22rpx;
color: #eb532a;
}
.old-price{
text-decoration: line-through;
}
.right {
padding-left: 16rpx;
margin-top: 30rpx;