批量商品价格展示

master
lemon橪 2022-05-27 18:16:12 +08:00
parent 3405cf68bb
commit 8a7f9b2487
3 changed files with 8082 additions and 8757 deletions

View File

@ -3,8 +3,8 @@ var BASE = {
* @description api请求基础路径 * @description api请求基础路径
*/ */
API_DEV: { API_DEV: {
common: "https://common-api.pickmall.cn", common: "http://192.168.0.106:8890",
buyer: "https://buyer-api.pickmall.cn", buyer: "http://192.168.0.106:8888",
seller: "https://store-api.pickmall.cn", seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn" manager: "https://admin-api.pickmall.cn"
}, },

View File

@ -76,8 +76,27 @@
</div> </div>
<!-- 商品原价 --> <!-- 商品原价 -->
<div class="item-price-row" v-else> <div class="item-price-row" v-else>
<!-- 批发价格 -->
<div v-if="wholesaleNum.length">
<div class="flex">
<div class="item-price-title">
&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div v-for="(item,index) in wholesalePrice" :key="index" class="item-price item-num">{{
item | unitPrice("¥")
}}</div>
</div>
<div class="flex">
<div class="item-price-title"> </div>
<div v-for="(item,index) in wholesaleNum" :key="index" class="item-num item-price-num">{{item}}{{skuDetail.goodsUnit}}</div>
</div>
</div>
<!-- 普通价格 --> <!-- 普通价格 -->
<div> <div v-else>
<span class="item-price-title" <span class="item-price-title"
> &nbsp;&nbsp;&nbsp;&nbsp;</span > &nbsp;&nbsp;&nbsp;&nbsp;</span
> >
@ -85,25 +104,6 @@
skuDetail.price | unitPrice("¥") skuDetail.price | unitPrice("¥")
}}</span> }}</span>
</div> </div>
<!-- 批发价格 -->
<div>
<div class="flex">
<div class="item-price-title">
&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div class="item-price item-num">{{
skuDetail.price | unitPrice("¥")
}}</div>
<div class="item-price item-num">{{
skuDetail.price | unitPrice("¥")
}}</div>
</div>
<div class="flex">
<div class="item-price-title"> </div>
<div class="item-num item-price-num">20-39</div>
<div class="item-num item-price-num">40-90</div>
</div>
</div>
</div> </div>
<!-- 优惠券展示 --> <!-- 优惠券展示 -->
<div class="item-price-row" v-if="promotionMap['COUPON'].length"> <div class="item-price-row" v-if="promotionMap['COUPON'].length">
@ -285,6 +285,7 @@ export default {
detail: { detail: {
handler(val) { handler(val) {
this.skuDetail = val.data; this.skuDetail = val.data;
this.wholesaleList = val.wholesaleList
this.swiperGoodsImg(); this.swiperGoodsImg();
}, },
deep: true, deep: true,
@ -293,6 +294,7 @@ export default {
}, },
data() { data() {
return { return {
wholesaleList:[],
count: 1, // count: 1, //
imgIndex: 0, // imgIndex: 0, //
currentSelceted: [], // sku currentSelceted: [], // sku
@ -311,9 +313,18 @@ export default {
loading: false, // loading loading: false, // loading
loading1: false, // loading loading1: false, // loading
isCollected: false, // isCollected: false, //
}; };
}, },
components: { PicZoom, Promotion }, components: { PicZoom, Promotion },
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 }) :[]
}
},
methods: { methods: {
select(index, value) { select(index, value) {
// //

File diff suppressed because it is too large Load Diff