Authored by 周少峰

Merge branch 'hotfix/preSale'

... ... @@ -618,18 +618,18 @@ module.exports = class extends global.yoho.BaseModel {
_getOrderDetailOp(orderId, payment, status,
isCancel, paymentStatus, paymentType,
orderType, attribute, refundStatus) {
orderType, attribute, refundStatus, links) {
let operation = {};
// 立刻付款
if (paymentType === 1 && paymentStatus === 'N' && isCancel === 'N' && payment !== 19) {
if (_.includes(links, 'buyNow')) {
Object.assign(operation, {
goPay: helpers.urlFormat('/shopping/newpay', {ordercode: orderId})
});
}
// 取消订单
if (status < 3 && isCancel === 'N' && paymentStatus === 'N' && orderType !== 5) {
if (_.includes(links, 'closeOrder')) {
Object.assign(operation, {
cancelOrder: true
});
... ... @@ -874,7 +874,8 @@ module.exports = class extends global.yoho.BaseModel {
detail.operation = that._getOrderDetailOp(
orderDetail.order_code, +orderDetail.payment, +orderDetail.status,
orderDetail.is_cancel, orderDetail.payment_status, orderDetail.payment_type,
+orderDetail.order_type, +orderDetail.attribute, +orderDetail.refund_status
+orderDetail.order_type, +orderDetail.attribute, +orderDetail.refund_status,
orderDetail.links
);
detail.packageTitle = orderDetail.package_title;
... ...