Authored by 刘传洋

m

... ... @@ -385,7 +385,7 @@ const formatPromotion = (it, selectedGiftsList) => {
isGift: it.promotion_type === 'Gift',
isPriceGift: it.promotion_type === 'Needpaygift',
isNotReach: status === 0, // 未满足
isReach: status === 10 || status === 30, // 满足条件
isReach: status === 10 || status === 30 || status === 20, // 满足条件
isEmpty: status === 20, // 已售完
isSelected: status === 30 // 已选择,可更换
};
... ... @@ -408,7 +408,7 @@ const formatPromotion = (it, selectedGiftsList) => {
return s;
}
if (status === 0) {
if (info.isNotReach) {
let tipTxtMoney = `${ toDecimal(info.conditionValue)}`;
... ... @@ -422,7 +422,7 @@ const formatPromotion = (it, selectedGiftsList) => {
tipTxt = '<span style=\'color:#ff575c\'>' + tipTxt + '</span>';
info.promotionTitle = '还差' + tipTxt + '满足&nbsp;&nbsp;&nbsp;' + info.promotionTitle;
} else if (status === 10) {
} else if (info.isReach && !info.isSelected) {
info.promotionTitle = '已满足&nbsp;&nbsp;&nbsp;' + info.promotionTitle;
}
... ...
{{#if isGift}}
{{#if isEmpty}}
<a class="order-pay-link" href="javascript:void(0);">已抢光</a>
{{/if}}
{{#if isNotReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-view-btn">查看赠品</a>{{/if}}
{{#if isSelected}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-resel-btn">重选赠品</a>
{{else}}
{{#if isReach}}
{{#if isEmpty}}
<a class="order-pay-link" href="javascript:void(0);">已抢光</a>
{{else}}
{{#if isGift}}
{{#if isNotReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-view-btn">查看赠品</a>{{/if}}
{{#if isSelected}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>{{/if}}
data-role="gift-resel-btn">重选赠品</a>
{{else}}
{{#if isReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{#if isPriceGift}}
{{#if isSelected}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-resel-btn">重新换购</a>
{{else}}
{{#if isReach}}
{{#if isPriceGift}}
{{#if isSelected}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
class="order-pay-link"
data-role="pg-resel-btn">重新换购</a>
{{else}}
{{#if isReach}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
... ...