...
|
...
|
@@ -333,6 +333,8 @@ const getOrders = (uid, page, limit, type, isPage)=> { |
|
|
|
|
|
newOrder.orderNum = order.order_code; // 订单标识
|
|
|
newOrder.orderTime = moment.unix(_.get(order, 'create_time')).format('YYYY-MM-DD HH:mm:ss');
|
|
|
newOrder.time = _.get(order, 'create_time');
|
|
|
newOrder.payType = _.get(order, 'payment_type');
|
|
|
|
|
|
if (order.is_cancel === 'Y' || order.status === 6) {
|
|
|
newOrder.canDelete = true; // 删除订单
|
...
|
...
|
@@ -353,7 +355,8 @@ const getOrders = (uid, page, limit, type, isPage)=> { |
|
|
if (statusInfo.keyName === 'shipped') {
|
|
|
let expressInfo = yield _getExpressInfo(
|
|
|
order.order_code, uid,
|
|
|
order.payment_type, order.create_time
|
|
|
order.payment_type, order.create_time,
|
|
|
false
|
|
|
);
|
|
|
|
|
|
newOrder.logistics = expressInfo.logistics;
|
...
|
...
|
@@ -405,7 +408,7 @@ const getOrders = (uid, page, limit, type, isPage)=> { |
|
|
return newOrder;
|
|
|
});
|
|
|
|
|
|
result.list = yield Promise.map(orderInfo.order_list, handleOrder);
|
|
|
result.list = yield Promise.map(_.get(orderInfo, 'order_list', []), handleOrder);
|
|
|
|
|
|
if (isPage) {
|
|
|
result.pager = {
|
...
|
...
|
@@ -789,6 +792,8 @@ const detail = co(function * (uid, orderId) { |
|
|
};
|
|
|
});
|
|
|
|
|
|
const express = _.partial(_getExpressInfo, _, _, _, _, true);
|
|
|
|
|
|
module.exports = {
|
|
|
index,
|
|
|
ORDER_TYPE,
|
...
|
...
|
@@ -799,5 +804,6 @@ module.exports = { |
|
|
cancel,
|
|
|
detail,
|
|
|
getOrders,
|
|
|
closeReason
|
|
|
closeReason,
|
|
|
express
|
|
|
}; |
...
|
...
|
|