mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
批发商品展示
This commit is contained in:
@@ -36,29 +36,30 @@
|
||||
</view>
|
||||
<!-- 正常商品的价格 -->
|
||||
<view v-else>
|
||||
<div class="goods-price">
|
||||
<span>
|
||||
¥
|
||||
<span class="goods-price-bigshow">{{
|
||||
formatPrice(goodsDetail.price)[0]
|
||||
}}</span>
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 批发价格 -->
|
||||
<div class='price-row'>
|
||||
<div class='goods-price'>
|
||||
<span >
|
||||
<div class='price-row flex' v-if="wholesaleList.length">
|
||||
<div class='goods-price' v-for="(item,index) in wholesaleList" :key="index">
|
||||
<span>
|
||||
¥
|
||||
<span class="goods-price-bigshow">{{
|
||||
formatPrice(goodsDetail.price)[0]
|
||||
formatPrice(item.price)[0]
|
||||
}}</span>
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
.{{ formatPrice(item.price)[1] }}
|
||||
</span>
|
||||
<span class='wholesale-item'>
|
||||
{{item.num}}{{goodsDetail.goodsUnit}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
23-30
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-price" v-else>
|
||||
<span>
|
||||
¥
|
||||
<span class="goods-price-bigshow">{{
|
||||
formatPrice(goodsDetail.price)[0]
|
||||
}}</span>
|
||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||
</span>
|
||||
</div>
|
||||
</view>
|
||||
<view class="goods-check-skus">
|
||||
@@ -132,10 +133,15 @@
|
||||
formatList: [],
|
||||
currentSelceted: [],
|
||||
skuList: "",
|
||||
isClose: false, //是否可以点击遮罩关闭
|
||||
isClose: false, //是否可以点击遮罩关闭
|
||||
|
||||
};
|
||||
},
|
||||
props: {
|
||||
props: {
|
||||
wholesaleList:{
|
||||
type: null,
|
||||
default: false,
|
||||
},
|
||||
buyMask: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -164,6 +170,14 @@
|
||||
default: "",
|
||||
type: null,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
wholesalePrice(key){
|
||||
return this.wholesaleList.length ? this.wholesaleList.map(item=>{ return item.price }) :[]
|
||||
},
|
||||
wholesaleNum(key){
|
||||
return this.wholesaleList.length ? this.wholesaleList.map(item=>{ return item.num }) :[]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
num(val){
|
||||
@@ -454,6 +468,11 @@
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wholesale-item{
|
||||
color: #999 !important;
|
||||
font-size: 24rpx;
|
||||
margin:0 20rpx;
|
||||
}
|
||||
|
||||
.goods-header {
|
||||
|
||||
Reference in New Issue
Block a user