Authored by 郭成尧

'error-handle'

... ... @@ -23,7 +23,7 @@ let orderDetail = (req, res, next) => {
};
orderDetailModel.orderDetail({
uid: req.user.uid,
uid: req.user.uid || 8039759, //TODO 待删除
order_code: req.query.order_code
}).then(result => {
if (result) {
... ...
... ... @@ -10,43 +10,44 @@ const orderDetail = (params) => {
return api.get('', _.assign({
method: 'app.SpaceOrders.detail'
}, params), {code: 200}).then((result) => {
Object.assign(finalResult, {
virtual_type: result.data.virtual_type,
phoneNum: result.data.mobile,
orderStatus: result.data.status_str,
orderNum: result.data.order_code,
orderTime: result.data.create_time,
isPay: result.data.payment_status === 'Y',
relation: result.data.relate_order_code === 'Y' ? 'true' : 'false',
name: result.data.user_name,
isVirtual: false,
mobile: '15999999999',
address: result.data.address,
logisticsUrl: '#',
logisticsCompany: '顺丰',
logisticsNum: '111111',
yohoCoin: result.data.yoho_give_coin,
invoice: [{
title: '有货',
contentValue: '有货',
pdfUrl: '#'
}, {
title: '有货',
contentValue: '有货',
pdfUrl: '#'
}],
orderBalance: [{
promotion: '商品总金额',
account: '100.00'
}, {
promotion: '运费',
account: '10.00'
}],
price: result.data.amount
});
if (result.data) {
Object.assign(finalResult, {
virtual_type: result.data.virtual_type,
phoneNum: result.data.mobile,
orderStatus: result.data.status_str,
orderNum: result.data.order_code,
orderTime: result.data.create_time,
isPay: result.data.payment_status === 'Y',
relation: result.data.relate_order_code === 'Y' ? 'true' : 'false',
name: result.data.user_name,
isVirtual: false,
mobile: '15999999999',
address: result.data.address,
logisticsUrl: '#',
logisticsCompany: '顺丰',
logisticsNum: '111111',
yohoCoin: result.data.yoho_give_coin,
invoice: [{
title: '有货',
contentValue: '有货',
pdfUrl: '#'
}, {
title: '有货',
contentValue: '有货',
pdfUrl: '#'
}],
orderBalance: [{
promotion: '商品总金额',
account: '100.00'
}, {
promotion: '运费',
account: '10.00'
}],
price: result.data.amount
});
}
return finalResult;
});
... ...