适配促销活动,修复促销问题

master
paulGao 2021-12-21 19:12:04 +08:00
parent 892f49c83a
commit e4e278c2fa
3 changed files with 22 additions and 18 deletions

View File

@ -116,7 +116,7 @@
<view class="card-box top-radius-0" id="main2">
<!-- 活动不显示价钱 -->
<view v-if="!isPromotion" class="desc-bold -goods-msg">
<view v-if="!promotionFlag" class="desc-bold -goods-msg">
<view class="-goods-flex">
<view class="desc-bold">
{{ goodsDetail.goodsName || "" }}
@ -442,7 +442,7 @@ export default {
popupsSwitch: false, //
shareFlage: false,
selectedGoods: "", //
isPromotion: true, //
promotionFlag: true, //
isGroup: false, //
pointDetail: "", //
assemble: "", //sku
@ -533,9 +533,9 @@ export default {
clearInterval(timer);
}, 100);
this.isPromotion = false;
this.promotionFlag = false;
} else {
this.isPromotion = true;
this.promotionFlag = true;
this.$refs.popupGoods.buyType = "";
}
},

View File

@ -1,34 +1,38 @@
<template>
<view class="wrapper" v-if="res">
<view v-for="(prom, index) in Object.keys(res)" :key="index">
<view>
<view v-if="prom.split('-')[0] == 'FULL_DISCOUNT'">
<div class="res_prom_item" v-if="res[prom].fullMinus">
<u-tag text="满减" type="error"></u-tag>
<!-- TODO 后续将优化为可点击的商品以及优惠券显示明细 -->
<span class="pro-text">{{ res[prom].fullMoney }} 立减现金 <span class="price">{{ res[prom].fullMinus}}</span>
<span v-if="res[prom].isCoupon"> <span>优惠券</span></span>
<span v-if="res[prom].isPoint"> {{res[prom].point}}</span>
<span v-if="res[prom].isGift"> </span>
<span v-if="res[prom].isFreeFreight"></span>
<span class="pro-text"
>{{ res[prom].fullMoney }} 立减现金
<span class="price">{{ res[prom].fullMinus }}</span>
<span v-if="res[prom].couponFlag"> <span>优惠券</span></span>
<span v-if="res[prom].pointFlag"> {{ res[prom].point }}</span>
<span v-if="res[prom].giftFlag"> </span>
<span v-if="res[prom].freeFreightFlag"></span>
</span>
</div>
<div class="res_prom_item" v-if="res[prom].fullRate">
<u-tag text="打折" type="error"></u-tag>
<span class="pro-text">{{ res[prom].fullMoney }}立享<span
class="price">{{ res[prom].fullRate }}</span>优惠</span>
<span class="pro-text"
>{{ res[prom].fullMoney }}立享<span class="price"
>{{ res[prom].fullRate }}</span
>优惠</span
>
</div>
</view>
<view v-if="prom.split('-')[0] == 'PINTUAN'">
<div class="res_prom_item" v-if="res[prom].requiredNum">
<u-tag text="拼团" type="error"></u-tag>
<span class="pro-text">{{ res[prom].requiredNum }}人拼团 限购<span
class="price">{{ res[prom].limitNum}}</span></span>
<span class="pro-text"
>{{ res[prom].requiredNum }}人拼团 限购<span class="price"
>{{ res[prom].limitNum }}</span
></span
>
</div>
</view>

View File

@ -42,7 +42,7 @@
{{groupItem.price | unitPrice }}
</view>
<view class="view-content-original_price">
{{ groupItem.originPrice | unitPrice }}
{{ groupItem.originalPrice | unitPrice }}
</view>
</view>