修改易购部分bug

This commit is contained in:
赵毅 2025-09-04 18:04:42 +08:00
parent 267bac2149
commit 916e41e424
4 changed files with 17 additions and 62 deletions

View File

@ -503,7 +503,7 @@ export default {
submitPayment() {
//
const supplierIds = [...new Set(this.orderList2.map(item =>
item.commodity_goods_info.group_buy_activity_info?.supplier_id || 'default'
item.supplier_id || 'default'
))];
const allHaveZTAddress = supplierIds.every(supplierId => {
@ -536,7 +536,7 @@ export default {
const currentTime = new Date().getTime();
return {
supplier_id: firstItem.commodity_goods_info.group_buy_activity_info.supplier_id,
supplier_id: firstItem.supplier_id,
supplier_name: firstItem.supplier_name || '',
is_same_day: firstItem.commodity_goods_info.is_same_day,
receiving_name: ztAddress.name || '',
@ -548,7 +548,7 @@ export default {
const endTime = new Date(item.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
const isGroupBuy = currentTime >= startTime && currentTime <= endTime;
return {
goods_id: item.commodity_goods_info.goods_id,
goods_id: item.goods_id,
count: item.count,
price: isGroupBuy ? item.commodity_goods_info.group_buy_price : item.commodity_goods_info.sales_price,
freight: item.commodity_goods_info.freight,

View File

@ -162,7 +162,7 @@ page {
overflow: hidden;
position: relative;
overflow-y: auto;
margin-bottom: 150rpx;
padding-bottom: 260rpx;
}
.CateInfo_tit {
@ -403,7 +403,7 @@ page {
padding-bottom: 30rpx;
position: absolute;
left: 0;
top: 0;
top: 160rpx;
z-index: 11;
}
@ -429,7 +429,7 @@ page {
left: 0;
right: 0;
bottom: 0;
top: 0;
top: 160rpx;
background-color: rgba(0, 0, 0, 0.3);
z-index: 10;
}
@ -578,17 +578,10 @@ page {
.shop_car {
width: 140rpx;
height: 140rpx;
position: fixed;
right: -95rpx;
bottom: 180rpx;
position: absolute;
bottom: 100rpx;
right: 10rpx;
z-index: 10;
transition: right 0.3s ease;
}
.shop_car:hover,
.shop_car.show {
right: 33rpx;
/* 鼠标悬停或滚动时完全显示 */
}
.shop_car image {

View File

@ -2,7 +2,7 @@
<view class="container">
<!-- 顶部展开后的阴影 -->
<view class="boxshadow" v-if="topShow"></view>
<view class="header" :class="topShow ? 'op0' : ''">
<view class="header">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_left" @click="back">
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
@ -33,7 +33,7 @@
<!-- 整体展开的顶部 -->
<view class="header header2" v-if="topShow">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<!-- <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_left">
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
</view>
@ -42,7 +42,7 @@
mode="aspectFill"></image>
<input type="text" placeholder="输入商品名称" />
</view>
</view>
</view> -->
<view class="slide">
<view class="slide_con">
@ -312,28 +312,7 @@ export default {
NavgateTo('1')
},
//
showShopCar() {
this.$nextTick(() => {
try {
const shopCar = document.querySelector('.shop_car');
if (shopCar) {
shopCar.classList.add('show');
// 2
clearTimeout(this.hideShopCarTimer);
this.hideShopCarTimer = setTimeout(() => {
const carElement = document.querySelector('.shop_car');
if (carElement) {
carElement.classList.remove('show');
}
}, 2000);
}
} catch (error) {
console.log(error);
}
});
},
changeCate(id) {
// ID
@ -360,6 +339,7 @@ export default {
},
//
checkItem(index) {
this.cateListShow = false
this.rightTopActive = index;
// ID
this.selectedTagId = this.tagList[index].id;
@ -548,39 +528,17 @@ export default {
this.localHeight = meun.height;
this.getCateList();
// this.getShopCarList();
//
this.hideShopCarTimer = null;
},
onShow() {
this.getShopCarList();
this.getGoodsList();
// - 使nextTickDOM
this.$nextTick(() => {
try {
const conRight = document.querySelector('.Con_right');
if (conRight) {
this.conRightElement = conRight;
conRight.addEventListener('scroll', this.showShopCar);
}
} catch (error) {
console.log(error);
}
});
},
onHide() {
//
if (this.conRightElement) {
this.conRightElement.removeEventListener('scroll', this.showShopCar);
this.conRightElement = null;
}
//
if (this.hideShopCarTimer) {
clearTimeout(this.hideShopCarTimer);
}
},
onReachBottom() {
if (this.flag) {

View File

@ -293,6 +293,10 @@ export default {
})
});
if (arr.length == 0) {
this.$u.toast("请选择商品");
return;
}
// NavgateTo(`../submitOrder/index?shopCarList=${JSON.stringify(arr)}`);
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(arr)}`);
},