Authored by OF1706

促销标题

... ... @@ -42,6 +42,9 @@ const getShoppingKeyByCookie = (req) => {
const transPrice = (price) => {
return price ? (price * 1).toFixed(2) : '0.00';
};
const trans = (x) => {
return x*1;
};
/**
* 生成公开的TOKEN凭证
... ... @@ -410,19 +413,21 @@ const formatPromotion = (it, selectedGiftsList) => {
if (status === 0) {
let tipTxtMoney = `还差${ toDecimal(info.conditionValue)}`;
let tipTxtMoney = `${ toDecimal(info.conditionValue)}`;
let tipTxt = `还差${ -(Math.round(parseFloat(info.conditionValue) * 100) / 100)}`;
let tipTxt = `${ -(Math.round(parseFloat(info.conditionValue) * 100) / 100)}`;
if (info.conditionUnit === 1) {
tipTxt += '件满足';
tipTxt += '件';
} else if (info.conditionUnit === 2) {
tipTxt = tipTxtMoney + '元满足';
tipTxt = tipTxtMoney + '元';
}
info.promotionTitle = tipTxt + info.promotionTitle;
tipTxt = "<span style='color:#ff575c'>" + tipTxt + "</span>";
info.promotionTitle = '还差' + tipTxt + '满足' + "&nbsp;&nbsp;&nbsp;" + info.promotionTitle;
} else if (status === 10) {
info.promotionTitle = '已满足' + info.promotionTitle;
info.promotionTitle = '已满足' + "&nbsp;&nbsp;&nbsp;" +info.promotionTitle;
}
if (info.giftGoodsList) {
... ...
... ... @@ -3,15 +3,15 @@
data-promotionid="{{promotionId}}">
<code class="order-pay-mark {{#unless isReach}}order-pay-mark-white{{/unless}}">
{{tag}}
</code>{{promotionTitle}}
</code>{{{promotionTitle}}}
{{> mix/cart/cart-promotion-btn}}
{{#or isGift isPriceGift}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;<i class="iconfont">&#xe6ef;</i></a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单<i class="iconfont">&#xe6ef;</i></a>
{{/if}}
{{else}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去查看&nbsp;<i class="iconfont">&#xe6ef;</i></a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去查看<i class="iconfont">&#xe6ef;</i></a>
{{/or}}
</div>
... ...