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

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 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="-goods-flex">
<view class="desc-bold"> <view class="desc-bold">
{{ goodsDetail.goodsName || "" }} {{ goodsDetail.goodsName || "" }}
@ -442,7 +442,7 @@ export default {
popupsSwitch: false, // popupsSwitch: false, //
shareFlage: false, shareFlage: false,
selectedGoods: "", // selectedGoods: "", //
isPromotion: true, // promotionFlag: true, //
isGroup: false, // isGroup: false, //
pointDetail: "", // pointDetail: "", //
assemble: "", //sku assemble: "", //sku
@ -533,9 +533,9 @@ export default {
clearInterval(timer); clearInterval(timer);
}, 100); }, 100);
this.isPromotion = false; this.promotionFlag = false;
} else { } else {
this.isPromotion = true; this.promotionFlag = true;
this.$refs.popupGoods.buyType = ""; this.$refs.popupGoods.buyType = "";
} }
}, },

View File

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

View File

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