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 { @@ -53,13 +53,32 @@ module.exports = class extends global.yoho.BaseModel {
53 return {}; 53 return {};
54 } 54 }
55 55
56 - let attribute = _.parseInt(order.attribute); 56 + let attribute = _.parseInt(_.get(order, 'orderExtInfo.attribute'));
57 57
58 order = _.assign(order, { 58 order = _.assign(order, {
59 orderCode: _.get(order, 'orderExtInfo.orderCode') 59 orderCode: _.get(order, 'orderExtInfo.orderCode')
60 }); 60 });
61 61
62 if (attribute === 9 || attribute === 11) { 62 if (attribute === 9 || attribute === 11) {
  63 + // 定金预售拼接提示语
  64 + let countTime = 0;
  65 + let payAmount = 0;
  66 +
  67 + if (_.get(order, 'orderDetailInfo.ext.payLefttime') &&
  68 + parseInt(order.orderDetailInfo.ext.payLefttime, 10)) {
  69 + countTime = order.orderDetailInfo.ext.payLefttime * 1000;
  70 + }
  71 +
  72 + if (_.get(order, 'orderDetailInfo.key') === '203') { // 待支付尾款
  73 + payAmount = _.get(order, 'orderExtInfo.orderTailPayAmount');
  74 + order.orderDetailInfo.ext.desc = `你的商品已到货,您还需支付尾款<span>¥${payAmount}</span>
  75 + 请在<i class="hours new-hours hide">${countTime}</i>内完成支付。超时订单自动取消`;
  76 + } else if (_.get(order, 'orderDetailInfo.key') === '201') { // 待支付定金
  77 + payAmount = _.get(order, 'orderExtInfo.orderDepositAmount');
  78 + order.orderDetailInfo.ext.desc = `您需支付定金<span>¥${payAmount}</span>
  79 + 请在<i class="hours new-hours hide">${countTime}</i>内完成支付。超时订单自动取消`;
  80 + }
  81 +
63 /* 预售商品,不能进行任何操作 */ 82 /* 预售商品,不能进行任何操作 */
64 orderBtn.push({ 83 orderBtn.push({
65 isAdvance: true 84 isAdvance: true
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 {{#orderDetailInfo}} 8 {{#orderDetailInfo}}
9 <div class="status-c"> 9 <div class="status-c">
10 <div class="status-title">{{value}}</div> 10 <div class="status-title">{{value}}</div>
11 - <div class="status-body">{{ext.desc}}</div> 11 + <div class="status-body">{{{ext.desc}}}</div>
12 <div class="status-time">{{ext.pay_expire}}</div> 12 <div class="status-time">{{ext.pay_expire}}</div>
13 </div> 13 </div>
14 {{#if ../expressUrl}} 14 {{#if ../expressUrl}}
@@ -28,6 +28,8 @@ let $sureClose = $('.order-opt').find('.cancel'); // 取消订单按钮 @@ -28,6 +28,8 @@ let $sureClose = $('.order-opt').find('.cancel'); // 取消订单按钮
28 let $sureRefund = $('.order-opt').find('.refund'); // 申请退款按钮 28 let $sureRefund = $('.order-opt').find('.refund'); // 申请退款按钮
29 let $refundChangeMask = $('.refund-change-mask'); // 退换货选择组件 29 let $refundChangeMask = $('.refund-change-mask'); // 退换货选择组件
30 30
  31 +let $newHours = $('.new-hours').length > 0 ? true : false; // 新的倒计时格式标示
  32 +
31 require('common'); 33 require('common');
32 require('plugin/modal.alert'); 34 require('plugin/modal.alert');
33 35
@@ -66,10 +68,19 @@ function downCount(options) { @@ -66,10 +68,19 @@ function downCount(options) {
66 68
67 // set to DOM 69 // set to DOM
68 $countdownContainer.removeClass('hide'); 70 $countdownContainer.removeClass('hide');
  71 + $('.new-hours').removeClass('hide');
69 if (hours === '00') { 72 if (hours === '00') {
70 - $countDownHours.text('剩余' + minutes + ':' + seconds); 73 + if ($newHours) {
  74 + $countDownHours.text(minutes + '分' + seconds + '秒');
  75 + } else {
  76 + $countDownHours.text('剩余' + minutes + ':' + seconds);
  77 + }
71 } else { 78 } else {
72 - $countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds); 79 + if ($newHours) {
  80 + $countDownHours.text(hours + '时' + minutes + '分' + seconds + '秒');
  81 + } else {
  82 + $countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
  83 + }
73 } 84 }
74 85
75 difference -= 1000; 86 difference -= 1000;
@@ -405,6 +405,7 @@ @@ -405,6 +405,7 @@
405 color: #f00; 405 color: #f00;
406 float: right; 406 float: right;
407 margin-right: 30px; 407 margin-right: 30px;
  408 + margin-top: 40px;
408 } 409 }
409 } 410 }
410 411
@@ -22,6 +22,10 @@ @@ -22,6 +22,10 @@
22 color: #b0b0b0; 22 color: #b0b0b0;
23 line-height: 40px; 23 line-height: 40px;
24 margin-bottom: 5px; 24 margin-bottom: 5px;
  25 +
  26 + span {
  27 + color: #e01;
  28 + }
25 } 29 }
26 30
27 .status-time { 31 .status-time {