添加规格选择的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

@ -24,15 +24,15 @@ image {
} }
.isDay { .isDay {
background-color: orangered; background-color: orangered;
height: 35rpx; height: 35rpx;
border-radius: 5rpx; border-radius: 5rpx;
color: white; color: white;
font-size: 22rpx; font-size: 22rpx;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
display: flex; display: flex;
} }
.tag { .tag {
@ -188,7 +188,7 @@ image {
margin: 0 20rpx; margin: 0 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
font-weight: 700; font-weight: 700;
display: flex; display: flex;
} }
.Msg { .Msg {
@ -598,15 +598,17 @@ image {
margin: 5rpx 5rpx 0 5rpx; margin: 5rpx 5rpx 0 5rpx;
} }
.itemSizeBox {
margin: 30rpx;
}
.itemSize { .itemSize {
width: 30%;
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
background: #F6F7FB; background: #F6F7FB;
border-radius: 40rpx; border-radius: 40rpx;
padding: 10rpx 15rpx; padding: 10rpx 15rpx;
white-space: nowrap; white-space: nowrap;
margin:20rpx 30rpx;
} }
.itemSize_active { .itemSize_active {
@ -614,15 +616,14 @@ image {
color: #fff; color: #fff;
} }
.itemSize-img{ .itemSize-img {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-right: 30rpx; margin-right: 30rpx;
border-radius: 20rpx; border-radius: 20rpx;
border:1rpx solid red;
} }
.itemSize_top{ .itemSize_top {
display: flex; display: flex;
margin-left: 30rpx; margin-left: 30rpx;
} }

View File

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