Authored by 毕凯

Merge branch 'feature/orderDetail' into 'release/6.5.2'

预售拼接提示文案



See merge request !1286
... ... @@ -53,13 +53,32 @@ module.exports = class extends global.yoho.BaseModel {
return {};
}
let attribute = _.parseInt(order.attribute);
let attribute = _.parseInt(_.get(order, 'orderExtInfo.attribute'));
order = _.assign(order, {
orderCode: _.get(order, 'orderExtInfo.orderCode')
});
if (attribute === 9 || attribute === 11) {
// 定金预售拼接提示语
let countTime = 0;
let payAmount = 0;
if (_.get(order, 'orderDetailInfo.ext.payLefttime') &&
parseInt(order.orderDetailInfo.ext.payLefttime, 10)) {
countTime = order.orderDetailInfo.ext.payLefttime * 1000;
}
if (_.get(order, 'orderDetailInfo.key') === '203') { // 待支付尾款
payAmount = _.get(order, 'orderExtInfo.orderTailPayAmount');
order.orderDetailInfo.ext.desc = `你的商品已到货,您还需支付尾款<span>¥${payAmount}</span>
请在<i class="hours new-hours hide">${countTime}</i>内完成支付。超时订单自动取消`;
} else if (_.get(order, 'orderDetailInfo.key') === '201') { // 待支付定金
payAmount = _.get(order, 'orderExtInfo.orderDepositAmount');
order.orderDetailInfo.ext.desc = `您需支付定金<span>¥${payAmount}</span>
请在<i class="hours new-hours hide">${countTime}</i>内完成支付。超时订单自动取消`;
}
/* 预售商品,不能进行任何操作 */
orderBtn.push({
isAdvance: true
... ...
... ... @@ -8,7 +8,7 @@
{{#orderDetailInfo}}
<div class="status-c">
<div class="status-title">{{value}}</div>
<div class="status-body">{{ext.desc}}</div>
<div class="status-body">{{{ext.desc}}}</div>
<div class="status-time">{{ext.pay_expire}}</div>
</div>
{{#if ../expressUrl}}
... ...
... ... @@ -28,6 +28,8 @@ let $sureClose = $('.order-opt').find('.cancel'); // 取消订单按钮
let $sureRefund = $('.order-opt').find('.refund'); // 申请退款按钮
let $refundChangeMask = $('.refund-change-mask'); // 退换货选择组件
let $newHours = $('.new-hours').length > 0 ? true : false; // 新的倒计时格式标示
require('common');
require('plugin/modal.alert');
... ... @@ -66,10 +68,19 @@ function downCount(options) {
// set to DOM
$countdownContainer.removeClass('hide');
$('.new-hours').removeClass('hide');
if (hours === '00') {
$countDownHours.text('剩余' + minutes + ':' + seconds);
if ($newHours) {
$countDownHours.text(minutes + '分' + seconds + '秒');
} else {
$countDownHours.text('剩余' + minutes + ':' + seconds);
}
} else {
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
if ($newHours) {
$countDownHours.text(hours + '时' + minutes + '分' + seconds + '秒');
} else {
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
}
}
difference -= 1000;
... ...
... ... @@ -405,6 +405,7 @@
color: #f00;
float: right;
margin-right: 30px;
margin-top: 40px;
}
}
... ...
... ... @@ -22,6 +22,10 @@
color: #b0b0b0;
line-height: 40px;
margin-bottom: 5px;
span {
color: #e01;
}
}
.status-time {
... ...