Authored by lijing

订单详情

... ... @@ -24,7 +24,8 @@ let orderDetail = (req, res, next) => {
orderDetailModel.orderDetail({
uid: req.user.uid || 8039759, // TODO 待删除
order_code: req.query.order_code
order_code: req.query.order_code,
sessionKey: "aaa"
}).then(result => {
if (result) {
res.render('orderDetail', Object.assign(responseData,
... ...
... ... @@ -10,43 +10,45 @@ const orderDetail = (params) => {
return api.get('', _.assign({
method: 'app.SpaceOrders.detail'
}, params), {code: 200}).then((result) => {
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
});
if (params.order_code && params.uid && params.sessionKey) {
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;
... ...