Authored by 周少峰

Merge branch 'hotfix/preSale'

@@ -618,18 +618,18 @@ module.exports = class extends global.yoho.BaseModel { @@ -618,18 +618,18 @@ module.exports = class extends global.yoho.BaseModel {
618 618
619 _getOrderDetailOp(orderId, payment, status, 619 _getOrderDetailOp(orderId, payment, status,
620 isCancel, paymentStatus, paymentType, 620 isCancel, paymentStatus, paymentType,
621 - orderType, attribute, refundStatus) { 621 + orderType, attribute, refundStatus, links) {
622 let operation = {}; 622 let operation = {};
623 623
624 // 立刻付款 624 // 立刻付款
625 - if (paymentType === 1 && paymentStatus === 'N' && isCancel === 'N' && payment !== 19) { 625 + if (_.includes(links, 'buyNow')) {
626 Object.assign(operation, { 626 Object.assign(operation, {
627 goPay: helpers.urlFormat('/shopping/newpay', {ordercode: orderId}) 627 goPay: helpers.urlFormat('/shopping/newpay', {ordercode: orderId})
628 }); 628 });
629 } 629 }
630 630
631 // 取消订单 631 // 取消订单
632 - if (status < 3 && isCancel === 'N' && paymentStatus === 'N' && orderType !== 5) { 632 + if (_.includes(links, 'closeOrder')) {
633 Object.assign(operation, { 633 Object.assign(operation, {
634 cancelOrder: true 634 cancelOrder: true
635 }); 635 });
@@ -874,7 +874,8 @@ module.exports = class extends global.yoho.BaseModel { @@ -874,7 +874,8 @@ module.exports = class extends global.yoho.BaseModel {
874 detail.operation = that._getOrderDetailOp( 874 detail.operation = that._getOrderDetailOp(
875 orderDetail.order_code, +orderDetail.payment, +orderDetail.status, 875 orderDetail.order_code, +orderDetail.payment, +orderDetail.status,
876 orderDetail.is_cancel, orderDetail.payment_status, orderDetail.payment_type, 876 orderDetail.is_cancel, orderDetail.payment_status, orderDetail.payment_type,
877 - +orderDetail.order_type, +orderDetail.attribute, +orderDetail.refund_status 877 + +orderDetail.order_type, +orderDetail.attribute, +orderDetail.refund_status,
  878 + orderDetail.links
878 ); 879 );
879 880
880 detail.packageTitle = orderDetail.package_title; 881 detail.packageTitle = orderDetail.package_title;