批发商品展示
parent
1dc42e1333
commit
6e04a5d3da
|
@ -36,29 +36,30 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 正常商品的价格 -->
|
<!-- 正常商品的价格 -->
|
||||||
<view v-else>
|
<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='price-row flex' v-if="wholesaleList.length">
|
||||||
<div class='goods-price'>
|
<div class='goods-price' v-for="(item,index) in wholesaleList" :key="index">
|
||||||
<span >
|
<span>
|
||||||
¥
|
¥
|
||||||
<span class="goods-price-bigshow">{{
|
<span class="goods-price-bigshow">{{
|
||||||
formatPrice(goodsDetail.price)[0]
|
formatPrice(item.price)[0]
|
||||||
}}</span>
|
}}</span>
|
||||||
.{{ formatPrice(goodsDetail.price)[1] }}
|
.{{ formatPrice(item.price)[1] }}
|
||||||
|
</span>
|
||||||
|
<span class='wholesale-item'>
|
||||||
|
{{item.num}}{{goodsDetail.goodsUnit}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</div>
|
||||||
23-30
|
<div class="goods-price" v-else>
|
||||||
</div>
|
<span>
|
||||||
|
¥
|
||||||
|
<span class="goods-price-bigshow">{{
|
||||||
|
formatPrice(goodsDetail.price)[0]
|
||||||
|
}}</span>
|
||||||
|
.{{ formatPrice(goodsDetail.price)[1] }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-check-skus">
|
<view class="goods-check-skus">
|
||||||
|
@ -132,10 +133,15 @@
|
||||||
formatList: [],
|
formatList: [],
|
||||||
currentSelceted: [],
|
currentSelceted: [],
|
||||||
skuList: "",
|
skuList: "",
|
||||||
isClose: false, //是否可以点击遮罩关闭
|
isClose: false, //是否可以点击遮罩关闭
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
wholesaleList:{
|
||||||
|
type: null,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
buyMask: {
|
buyMask: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -164,6 +170,14 @@
|
||||||
default: "",
|
default: "",
|
||||||
type: null,
|
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: {
|
watch: {
|
||||||
num(val){
|
num(val){
|
||||||
|
@ -454,6 +468,11 @@
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.wholesale-item{
|
||||||
|
color: #999 !important;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin:0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-header {
|
.goods-header {
|
||||||
|
|
|
@ -164,12 +164,16 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<div class="promotion" @click="navigateToDetailPage(item)">
|
<div class="promotion" @click="navigateToDetailPage(item)">
|
||||||
|
<div v-if="item.content.salesModel == 'WHOLESALE'">
|
||||||
|
<span>批</span>
|
||||||
|
</div>
|
||||||
<div v-for="(promotionItem,promotionIndex) in getPromotion(item)" :key="promotionIndex">
|
<div v-for="(promotionItem,promotionIndex) in getPromotion(item)" :key="promotionIndex">
|
||||||
<span v-if="promotionItem.indexOf('COUPON') != -1">劵</span>
|
<span v-if="promotionItem.indexOf('COUPON') != -1">劵</span>
|
||||||
<span v-if="promotionItem.indexOf('FULL_DISCOUNT') != -1">满减</span>
|
<span v-if="promotionItem.indexOf('FULL_DISCOUNT') != -1">满减</span>
|
||||||
<span v-if="promotionItem.indexOf('SECKILL') != -1">秒杀</span>
|
<span v-if="promotionItem.indexOf('SECKILL') != -1">秒杀</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="count-config" @click="navigateToDetailPage(item)">
|
<div class="count-config" @click="navigateToDetailPage(item)">
|
||||||
<span>已售 {{ item.content.buyCount || "0" }}</span>
|
<span>已售 {{ item.content.buyCount || "0" }}</span>
|
||||||
<span>{{ item.content.commentNum || "0" }}条评论</span>
|
<span>{{ item.content.commentNum || "0" }}条评论</span>
|
||||||
|
|
|
@ -347,7 +347,8 @@
|
||||||
:isGroup="isGroup"
|
:isGroup="isGroup"
|
||||||
:id="productId"
|
:id="productId"
|
||||||
v-if="goodsDetail.id"
|
v-if="goodsDetail.id"
|
||||||
:pointDetail="pointDetail"
|
:pointDetail="pointDetail"
|
||||||
|
:wholesaleList="wholesaleList"
|
||||||
@handleClickSku="selectSku"
|
@handleClickSku="selectSku"
|
||||||
:buyMask="buyMask"
|
:buyMask="buyMask"
|
||||||
/>
|
/>
|
||||||
|
@ -522,7 +523,8 @@ export default {
|
||||||
startTimer: false, //未开启 是false
|
startTimer: false, //未开启 是false
|
||||||
|
|
||||||
routerVal: "",
|
routerVal: "",
|
||||||
IMLink: "", // IM地址
|
IMLink: "", // IM地址
|
||||||
|
wholesaleList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -661,6 +663,7 @@ export default {
|
||||||
}
|
}
|
||||||
/**商品信息以及规格信息存储 */
|
/**商品信息以及规格信息存储 */
|
||||||
this.goodsDetail = response.data.result.data;
|
this.goodsDetail = response.data.result.data;
|
||||||
|
this.wholesaleList = response.data.result.wholesaleList;
|
||||||
this.goodsSpec = response.data.result.specs;
|
this.goodsSpec = response.data.result.specs;
|
||||||
this.PromotionList = response.data.result.promotionMap;
|
this.PromotionList = response.data.result.promotionMap;
|
||||||
this.goodsParams = response.data.result.goodsParamsDTOList || [];
|
this.goodsParams = response.data.result.goodsParamsDTOList || [];
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
</p>
|
</p>
|
||||||
<!-- 规格 -->
|
<!-- 规格 -->
|
||||||
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p>
|
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p>
|
||||||
|
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
|
||||||
<p class="sp-number">
|
<p class="sp-number">
|
||||||
<view class="sp-price">
|
<view class="sp-price">
|
||||||
<div class="default-color" :class="{'main-color':Object.keys(skuItem.promotionMap).length ==0 }">
|
<div class="default-color" :class="{'main-color':Object.keys(skuItem.promotionMap).length ==0 }">
|
||||||
|
|
Loading…
Reference in New Issue