修复单规格阶梯拼团价显示问题

pull/8/head
ldh 2023-02-03 17:28:15 +08:00
parent 332633006f
commit 8a0e49fde2
2 changed files with 15 additions and 4 deletions

View File

@ -218,6 +218,9 @@
if (isEmpty(state.selectedSkuPrice)) {
return formatPrice(state.goodsInfo.price);
}
if(state.grouponNum === 0 && state.grouponType === 'groupon_ladder') {
return formatPrice(state.goodsInfo.price)
}
if (state.grouponType === 'groupon') {
return state.selectedSkuPrice.groupon_price;
}

View File

@ -15,7 +15,8 @@
<view class="goods-title ss-line-2">{{ goodsInfo.title }}</view>
<view class="header-right-bottom ss-flex ss-col-center ss-row-between">
<view class="price-text"> {{ goodsPrice }}</view>
<view class="tig ss-flex ss-col-center">
<!-- TODO @jj 拼团价放在标题左边 -->
<!-- <view class="tig ss-flex ss-col-center">
<view class="tig-icon ss-flex ss-col-center ss-row-center">
<view class="groupon-tag">
<image :src="sheep.$url.static('/static/img/shop/goods/groupon-tag-white.png')">
@ -23,9 +24,9 @@
</view>
</view>
<view class="tig-title">拼团价</view>
</view>
</view> -->
<view class="stock-text ss-m-l-20">
库存{{ state.selectedSkuPrice.stock || goodsInfo.stock }}
库存{{ state.selectedSkuPrice.stock || goodsInfo.stock }}000
</view>
</view>
</view>
@ -180,6 +181,10 @@
if (isEmpty(state.selectedSkuPrice)) {
return formatPrice(props.goodsInfo.price);
}
if(state.grouponNum === 0 && activityType === 'groupon_ladder') {
return formatPrice(props.goodsInfo.price)
}
if (activityType === 'groupon') {
return state.selectedSkuPrice.groupon_price;
}
@ -195,6 +200,9 @@
if (isEmpty(state.selectedSkuPrice)) {
return formatPrice(props.goodsInfo.price);
}
if(state.grouponNum === 0 && activityType === 'groupon_ladder') return;
if (activityType === 'groupon') {
return state.selectedSkuPrice.leader_price;
}
@ -206,7 +214,7 @@
//
function getSkuPriceByLadder() {
return state.selectedSkuPrice.ladders.find((item) => item.ladder == state.grouponNum);
return state.selectedSkuPrice.ladders.find((item) => item.ladder == state.grouponNum);
}
watch(