批发商品展示

master
lemon橪 2022-05-27 18:18:02 +08:00
commit 0e8ace560b
4 changed files with 495 additions and 466 deletions

View File

@ -1,515 +1,536 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<u-popup <u-popup class="popup" v-model="buyMask" :height="setup.height" closeable :mode="setup.mode"
class="popup" :border-radius="setup.radius" @close="closeMask()">
v-model="buyMask" <!-- 商品 -->
:height="setup.height" <view class="goods-box bottom">
closeable <view class="goods-header">
:mode="setup.mode" <view class="goods-img">
:border-radius="setup.radius" <u-image width="200rpx" border-radius="20" class="uimage" height="200rpx"
@close="closeMask()" :src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"></u-image>
> </view>
<!-- 商品 --> <view class="goods-skus">
<view class="goods-box bottom"> <!-- 有活动商品价格 -->
<view class="goods-header"> <view class="goods-price"
<view class="goods-img"> v-if="goodsDetail.promotionPrice && ((isGroup && buyType === 'PINTUAN') || !isGroup)">
<u-image <span v-if="goodsDetail.promotionPrice && !pointDetail">
width="200rpx"
border-radius="20" <span class="goods-price-promotionShow goods-price-bigshow">{{
class="uimage"
height="200rpx"
:src="selectedSpecImg ? selectedSpecImg : goodsDetail.thumbnail"
></u-image>
</view>
<view class="goods-skus">
<!-- 有活动商品价格 -->
<view class="goods-price" v-if="goodsDetail.promotionPrice && ((isGroup && buyType === 'PINTUAN') || !isGroup)">
<span v-if="goodsDetail.promotionPrice && !pointDetail">
<span class="goods-price-promotionShow goods-price-bigshow">{{
formatPrice(goodsDetail.promotionPrice)[0] formatPrice(goodsDetail.promotionPrice)[0]
}}</span> }}</span>
.{{ formatPrice(goodsDetail.promotionPrice)[1] }} .{{ formatPrice(goodsDetail.promotionPrice)[1] }}
</span> </span>
<span v-if="pointDetail.points"> <span v-if="pointDetail.points">
<span class="goods-price-promotionShow goods-price-bigshow">{{ <span class="goods-price-promotionShow goods-price-bigshow">{{
pointDetail.points pointDetail.points
}}</span> }}</span>
积分 积分
</span> </span>
<div class="promotion-box"> <div class="promotion-box">
<span class="goods-price-bigshow">{{ <span class="goods-price-bigshow">{{
formatPrice(goodsDetail.price)[0] formatPrice(goodsDetail.price)[0]
}}</span> }}</span>
.{{ formatPrice(goodsDetail.price)[1] }} .{{ formatPrice(goodsDetail.price)[1] }}
</div> </div>
</view> </view>
<!-- 正常商品的价格 --> <!-- 正常商品的价格 -->
<view class="goods-price" v-else> <view v-else>
<span>
<span class="goods-price-bigshow">{{
formatPrice(goodsDetail.price)[0]
}}</span>
.{{ formatPrice(goodsDetail.price)[1] }}
</span>
</view>
<view class="goods-check-skus">
已选
<span class="goods-check-skus-name">
{{ selectName }}
<span>{{ num }}</span>
</span>
</view>
</view>
</view>
<!-- 商品信息 -->
<scroll-view class="goods-skus-box" :scroll-y="true">
<!-- 规格 -->
<view
class="goods-skus-view"
:key="specIndex"
v-for="(spec, specIndex) in formatList"
>
<view class="skus-view-list">
<view class="view-class-title">{{ spec.name }}</view>
<!-- 正常逻辑 循环出sku --> <!-- 批发价格 -->
<view <div class='price-row flex' v-if="wholesaleList.length">
v-if="!parentOrder" <div class='goods-price' v-for="(item,index) in wholesaleList" :key="index">
:class="{ active: spec_val.value == currentSelceted[specIndex] }" <span>
class="skus-view-item"
v-for="(spec_val, spec_index) in spec.values" <span class="goods-price-bigshow">{{
:key="spec_index" formatPrice(item.price)[0]
@click="handleClickSpec(spec, specIndex, spec_val)" }}</span>
>{{ spec_val.value }} .{{ formatPrice(item.price)[1] }}
</view> </span>
<span class='wholesale-item'>
{{item.num}}{{goodsDetail.goodsUnit}}
</span>
</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">
已选
<span class="goods-check-skus-name">
{{ selectName }}
<span>{{ num }}</span>
</span>
</view>
<view class="goods-check-skus">
库存
<span class="goods-check-skus-name">
<span>{{ goodsDetail.quantity }}</span>
</span>
</view>
</view>
</view>
<!-- 商品信息 -->
<scroll-view class="goods-skus-box" :scroll-y="true">
<!-- 规格 -->
<view class="goods-skus-view" :key="specIndex" v-for="(spec, specIndex) in formatList">
<view class="skus-view-list">
<view class="view-class-title">{{ spec.name }}</view>
<!-- 拼团购买仅筛选出当前拼团类型商品 --> <!-- 正常逻辑 循环出sku -->
<view <view v-if="!parentOrder" :class="{ active: spec_val.value == currentSelceted[specIndex] }"
v-if="parentOrder && spec_val.skuId == goodsDetail.id" class="skus-view-item" v-for="(spec_val, spec_index) in spec.values" :key="spec_index"
:class="{ active: spec_val.value == currentSelceted[specIndex] }" @click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }}
class="skus-view-item" </view>
v-for="(spec_val, spec_index) in spec.values"
:key="spec_index" <!-- 拼团购买仅筛选出当前拼团类型商品 -->
@click="handleClickSpec(spec, specIndex, spec_val)" <view v-if="parentOrder && spec_val.skuId == goodsDetail.id"
>{{ spec_val.value }} :class="{ active: spec_val.value == currentSelceted[specIndex] }" class="skus-view-item"
</view> v-for="(spec_val, spec_index) in spec.values" :key="spec_index"
</view> @click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }}
</view> </view>
<!-- 数量 --> </view>
<view class="goods-skus-number"> </view>
<view class="view-class-title">数量</view> <!-- 数量 -->
<u-number-box <view class="goods-skus-number">
:bg-color="numberBox.bgColor" <view class="view-class-title">数量</view>
:max="200"
:color="numberBox.color" <u-input style='text-align: right;' v-model="num" type="number" />
:input-width="numberBox.width" </view>
:input-height="numberBox.height" </scroll-view>
:size="numberBox.size" <!-- 按钮 -->
:min="1" <view class="btns">
v-model="num" <view class="box-btn card" v-if="buyType != 'PINTUAN' && goodsDetail.goodsType != 'VIRTUAL_GOODS'"
> @click="addToCartOrBuy('cart')">加入购物车</view>
</u-number-box> <view class="box-btn buy" @click="addToCartOrBuy('buy')"></view>
</view> </view>
</scroll-view> </view>
<!-- 按钮 --> </u-popup>
<view class="btns"> </div>
<view
class="box-btn card"
v-if="buyType != 'PINTUAN' && goodsDetail.goodsType != 'VIRTUAL_GOODS'"
@click="addToCartOrBuy('cart')"
>加入购物车</view
>
<view class="box-btn buy" @click="addToCartOrBuy('buy')"></view>
</view>
</view>
</u-popup>
</div>
</template> </template>
<script> <script>
import * as API_trade from "@/api/trade.js"; import * as API_trade from "@/api/trade.js";
import setup from "./popup"; import setup from "./popup";
export default { export default {
data() { data() {
return { return {
setup, setup,
num: 1, num: 1,
// rpx
numberBox: {
width: "50",
height: "50",
size: "22",
color: "#333",
bgColor: "#fff",
},
selectName: "", //
selectSkuList: "", //sku,
selectedSpecImg: "", //
buyType: "", //
parentOrder: "", // -
formatList: [],
currentSelceted: [],
skuList: "",
isClose: false, //
};
},
props: {
buyMask: {
type: Boolean,
default: false,
},
isGroup: {
type: Boolean,
default: false,
},
goodsDetail: {
default: "",
type: null,
},
selectedSku: {
default: "",
type: null,
},
goodsSpec: {
default: "",
type: null,
},
addr: {
default: "",
type: null,
},
pointDetail: {
default: "",
type: null,
},
},
watch: {
buyType: {
handler(val) {
if (val) {
this.buyType = val;
}
},
immediate: true,
},
selectSkuList: {
handler(val, oldval) {
this.$emit("changed", val);
},
deep: true,
},
},
methods: { selectName: "", //
// 1999 --> [1999,00] selectSkuList: "", //sku,
formatPrice(val) { selectedSpecImg: "", //
if (typeof val == "undefined") { buyType: "", //
return val; parentOrder: "", // -
} formatList: [],
return val.toFixed(2).split("."); currentSelceted: [],
}, skuList: "",
isClose: false, //
closeMask() { };
this.$emit("closeBuy", false); },
}, props: {
wholesaleList:{
type: null,
default: false,
},
buyMask: {
type: Boolean,
default: false,
},
isGroup: {
type: Boolean,
default: false,
},
goodsDetail: {
default: "",
type: null,
},
selectedSku: {
default: "",
type: null,
},
goodsSpec: {
default: "",
type: null,
},
addr: {
default: "",
type: null,
},
pointDetail: {
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){
if(val){
if(val > this.goodsDetail.quantity){
console.log(val)
this.val = this.goodsDetail.quantity
}
}
},
buyType: {
handler(val) {
if (val) {
this.buyType = val;
}
},
immediate: true,
},
selectSkuList: {
handler(val, oldval) {
this.$emit("changed", val);
},
deep: true,
},
},
/**点击规格 */ methods: {
handleClickSpec(val, index, specValue) { // 1999 --> [1999,00]
this.currentSelceted[index] = specValue.value; formatPrice(val) {
let selectedSkuId = this.goodsSpec.find((i) => { if (typeof val == "undefined") {
let matched = true; return val;
let specValues = i.specValues.filter((j) => j.specName !== "images"); }
for (let n = 0; n < specValues.length; n++) { return val.toFixed(2).split(".");
if (specValues[n].specValue !== this.currentSelceted[n]) { },
matched = false;
return;
}
}
if (matched) {
return i;
}
});
if (selectedSkuId?.skuId) {
this.$set(this.currentSelceted, index, specValue.value);
this.selectSkuList = {
spec: {
specName: val.name,
specValue: specValue.value,
},
data: this.goodsDetail,
};
this.selectName = specValue.value;
this.$emit("handleClickSku", { closeMask() {
skuId: selectedSkuId.skuId, this.$emit("closeBuy", false);
goodsId: this.goodsDetail.goodsId, },
});
} else {
uni.showToast({
title: "暂无该商品!",
duration: 2000,
icon: "none",
});
}
},
/** /**点击规格 */
* 直接购买 handleClickSpec(val, index, specValue) {
*/ this.currentSelceted[index] = specValue.value;
buy(data) { let selectedSkuId = this.goodsSpec.find((i) => {
API_trade.addToCart(data).then((res) => { let matched = true;
if (res.data.success) { let specValues = i.specValues.filter((j) => j.specName !== "images");
uni.navigateTo({ for (let n = 0; n < specValues.length; n++) {
url: `/pages/order/fillorder?way=${ if (specValues[n].specValue !== this.currentSelceted[n]) {
matched = false;
return;
}
}
if (matched) {
return i;
}
});
if (selectedSkuId?.skuId) {
this.$set(this.currentSelceted, index, specValue.value);
this.selectSkuList = {
spec: {
specName: val.name,
specValue: specValue.value,
},
data: this.goodsDetail,
};
this.selectName = specValue.value;
this.$emit("handleClickSku", {
skuId: selectedSkuId.skuId,
goodsId: this.goodsDetail.goodsId,
});
} else {
uni.showToast({
title: "暂无该商品!",
duration: 2000,
icon: "none",
});
}
},
/**
* 直接购买
*/
buy(data) {
API_trade.addToCart(data).then((res) => {
if (res.data.success) {
uni.navigateTo({
url: `/pages/order/fillorder?way=${
data.cartType data.cartType
}&addr=${""}&parentOrder=${encodeURIComponent( }&addr=${""}&parentOrder=${encodeURIComponent(
JSON.stringify(this.parentOrder) JSON.stringify(this.parentOrder)
)}`, )}`,
}); });
} }
}); });
}, },
/** /**
* 添加到购物车或购买 * 添加到购物车或购买
*/ */
addToCartOrBuy(val) { addToCartOrBuy(val) {
if (!this.selectSkuList) { if (!this.selectSkuList) {
uni.showToast({ uni.showToast({
title: "请选择规格商品", title: "请选择规格商品",
icon: "none", icon: "none",
}); });
return; return;
} }
let data = { let data = {
skuId: this.goodsDetail.id, skuId: this.goodsDetail.id,
num: this.num, num: this.num,
}; };
if (val == "cart") { if (val == "cart") {
API_trade.addToCart(data).then((res) => { API_trade.addToCart(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
title: "商品已添加到购物车", title: "商品已添加到购物车",
icon: "none", icon: "none",
}); });
this.$emit("queryCart"); this.$emit("queryCart");
this.closeMask(); this.closeMask();
} }
}); });
} else { } else {
// //
if (this.buyType) { if (this.buyType) {
data.cartType = "PINTUAN"; data.cartType = "PINTUAN";
} else if (this.goodsDetail.goodsType == "VIRTUAL_GOODS") { } else if (this.goodsDetail.goodsType == "VIRTUAL_GOODS") {
data.cartType = "VIRTUAL"; data.cartType = "VIRTUAL";
} else { } else {
data.cartType = "BUY_NOW"; data.cartType = "BUY_NOW";
} }
API_trade.addToCart(data).then((res) => { API_trade.addToCart(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/order/fillorder?way=${data.cartType}&addr=${ url: `/pages/order/fillorder?way=${data.cartType}&addr=${
this.addr.id || "" this.addr.id || ""
}&parentOrder=${encodeURIComponent(JSON.stringify(this.parentOrder))}`, }&parentOrder=${encodeURIComponent(JSON.stringify(this.parentOrder))}`,
}); });
} }
}); });
} }
}, },
formatSku(list) { formatSku(list) {
// //
let arr = [{}]; let arr = [{}];
if(!Array.isArray(list)){ if (!Array.isArray(list)) {
return false return false
} }
list.forEach((item, index) => { list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => { item.specValues.forEach((spec, specIndex) => {
let name = spec.specName; let name = spec.specName;
let values = { let values = {
value: spec.specValue, value: spec.specValue,
quantity: item.quantity, quantity: item.quantity,
skuId: item.skuId, skuId: item.skuId,
}; };
if (name === "images") { if (name === "images") {
return; return;
} }
arr.forEach((arrItem, arrIndex) => { arr.forEach((arrItem, arrIndex) => {
if ( if (
arrItem.name == name && arrItem.name == name &&
arrItem.values && arrItem.values &&
!arrItem.values.find((i) => { !arrItem.values.find((i) => {
return i.value === values.value; return i.value === values.value;
}) })
) { ) {
arrItem.values.push(values); arrItem.values.push(values);
} }
let keys = arr.map((key) => { let keys = arr.map((key) => {
return key.name; return key.name;
}); });
if (!keys.includes(name)) { if (!keys.includes(name)) {
arr.push({ arr.push({
name: name, name: name,
values: [values], values: [values],
}); });
} }
}); });
}); });
}); });
arr.shift(); arr.shift();
this.formatList = arr; this.formatList = arr;
list.forEach((item) => { list.forEach((item) => {
// //
if (item.skuId === this.goodsDetail.id) { if (item.skuId === this.goodsDetail.id) {
item.specValues item.specValues
.filter((i) => i.specName !== "images") .filter((i) => i.specName !== "images")
.forEach((value, _index) => { .forEach((value, _index) => {
this.currentSelceted[_index] = value.specValue; this.currentSelceted[_index] = value.specValue;
this.selectName = value.specValue; this.selectName = value.specValue;
this.selectSkuList = { this.selectSkuList = {
spec: value, spec: value,
data: this.goodsDetail, data: this.goodsDetail,
}; };
}); });
} }
}); });
this.skuList = list; this.skuList = list;
// console.log(" this.skuList", this.skuList) // console.log(" this.skuList", this.skuList)
}, },
}, },
mounted() { mounted() {
this.formatSku(this.goodsSpec); this.formatSku(this.goodsSpec);
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./popup.scss"; @import "./popup.scss";
.price-row{
text-align: center;
.buy { }
background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d); .buy {
box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2); background-image: linear-gradient(135deg, #ffba0d, #ffc30d 69%, #ffcf0d);
} box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2);
}
.card { .card {
background-image: linear-gradient(135deg, #f2140c, #f2270c 70%, #f24d0c); background-image: linear-gradient(135deg, #f2140c, #f2270c 70%, #f24d0c);
box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2); box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2);
} }
/deep/.u-icon-plus, /deep/.u-icon-plus,
.u-icon-minus, .u-icon-minus,
.u-icon-disabled { .u-icon-disabled {
height: 30rpx !important; height: 30rpx !important;
background: #fff !important; background: #fff !important;
} }
.goods-skus-number { .goods-skus-number {
justify-content: space-between; justify-content: space-between;
display: flex; display: flex;
} text-align: right
}
/deep/ .uni-scroll-view { /deep/ .uni-scroll-view {
overflow: hidden !important; overflow: hidden !important;
} }
.active { .active {
background: $price-light-color !important; background: $price-light-color !important;
border: 2rpx solid $price-color; border: 2rpx solid $price-color;
font-weight: bold; font-weight: bold;
color: $price-color !important; color: $price-color !important;
box-sizing: border-box; box-sizing: border-box;
} }
.goods-skus-box { .goods-skus-box {
overflow-y: auto; overflow-y: auto;
height: 610rpx; height: 610rpx;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
height: 570rpx; height: 570rpx;
// #endif // #endif
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.goods-skus-view { .goods-skus-view {
overflow: hidden; overflow: hidden;
.skus-view-list { .skus-view-list {
> .skus-view-item { >.skus-view-item {
flex: 1; flex: 1;
padding: 0 36rpx; padding: 0 36rpx;
overflow: hidden; overflow: hidden;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
float: left; float: left;
text-align: center; text-align: center;
margin-left: 24rpx; margin-left: 24rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #262626; color: #262626;
background: #f2f2f2; background: #f2f2f2;
border-radius: 30rpx; border-radius: 30rpx;
} }
} }
} }
.wholesale-item{
color: #999 !important;
font-size: 24rpx;
margin:0 20rpx;
}
.goods-header { .goods-header {
height: 200rpx; height: 200rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 36rpx; margin-bottom: 36rpx;
} }
.goods-box { .goods-box {
padding: 50rpx 36rpx 0 36rpx; padding: 50rpx 36rpx 0 36rpx;
} }
.goods-skus { .goods-skus {
padding: 0 20rpx; padding: 0 20rpx;
} }
.goods-price { .goods-price {
color: $price-color; color: $price-color;
line-height: 80rpx; line-height: 80rpx;
display: flex; >* {
} color: $price-color;
.promotion-box { line-height: 80rpx;
line-height: 1;
display: flex; }
align-items: center; }
text-decoration: line-through;
color: #999; .promotion-box {
margin-left: 10rpx; line-height: 1;
/deep/ span { display: flex;
font-size: 30rpx; align-items: center;
} text-decoration: line-through;
} color: #999;
.promotion { margin-left: 10rpx;
font-size: 30rpx;
} /deep/ span {
.goods-price-promotionShow { font-size: 30rpx;
font-size: 48rpx; }
} }
.goods-check-skus {
font-size: 24rpx; .promotion {
color: #999; font-size: 30rpx;
> .goods-check-skus-name { }
margin-left: 4rpx;
} .goods-price-promotionShow {
> span { font-size: 48rpx;
color: #333; }
}
} .goods-check-skus {
font-size: 24rpx;
color: #999;
>.goods-check-skus-name {
margin-left: 4rpx;
}
>span {
color: #333;
}
}
</style> </style>

View File

@ -152,12 +152,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>

View File

@ -348,6 +348,7 @@
: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"
/> />
@ -523,6 +524,7 @@ export default {
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 || [];

View File

@ -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 }">