添加规格选择的popup

This commit is contained in:
赵毅 2025-09-05 11:34:04 +08:00
parent 0c7b906afd
commit f2983a3de5
2 changed files with 22 additions and 21 deletions

View File

@ -598,15 +598,17 @@ image {
margin: 5rpx 5rpx 0 5rpx;
}
.itemSizeBox {
margin: 30rpx;
}
.itemSize {
width: 30%;
font-size: 26rpx;
color: #333;
background: #F6F7FB;
border-radius: 40rpx;
padding: 10rpx 15rpx;
white-space: nowrap;
margin:20rpx 30rpx;
}
.itemSize_active {
@ -614,15 +616,14 @@ image {
color: #fff;
}
.itemSize-img{
.itemSize-img {
width: 100rpx;
height: 100rpx;
margin-right: 30rpx;
border-radius: 20rpx;
border:1rpx solid red;
}
.itemSize_top{
.itemSize_top {
display: flex;
margin-left: 30rpx;
}

View File

@ -39,7 +39,7 @@
{{ item.goods_spec }} / {{ item.goods_unit }}
</view>
</view>
<view class="GG_rigth">
<view class="GG_rigth" @click="showSizePopup">
{{ info.commodity_goods_info_list.length }}<u-icon size="26rpx" name="arrow-right"></u-icon>
</view>
</view>
@ -297,9 +297,9 @@
<view class="itemSize_price">{{ changePrice }}/</view>
</view>
</view>
<view class="itemSize" v-for="(item, index) in info.commodity_goods_info_list" :key="item.id"
@click="changeGG(item, index)" :class="index == currentGGIndex ? 'itemSize_active' : ''">
{{ item.goods_name }} {{ item.goods_spec }} / {{ item.goods_unit }}
<view class="itemSizeBox" v-for="(item, index) in info.commodity_goods_info_list" :key="item.id"
@click="changeGG(item, index)">
<text class="itemSize" :class="index == currentGGIndex ? 'itemSize_active' : ''">{{ item.goods_name }} {{ item.goods_spec }} / {{ item.goods_unit }}</text>
</view>
</u-popup>
</view>
@ -459,7 +459,7 @@ export default {
console.log("this.currentGG", this.currentGG);
this.currentGGIndex = 0;
this.changeImg = this.currentGG.commodity_pic[0]
this.changeImg = picUrl + this.currentGG.commodity_pic[0]
this.changeName = this.currentGG.goods_alias
this.changePrice = this.currentGG.sales_price
});
@ -490,7 +490,7 @@ export default {
count: 0
};
}
this.changeImg = item.commodity_pic[0]
this.changeImg = picUrl + item.commodity_pic[0]
this.changeName = item.goods_alias
this.changePrice = item.sales_price
this.getComment(item.goods_id)