...
|
...
|
@@ -43,10 +43,24 @@ const refund = (req, res, next) => { |
|
|
return next();
|
|
|
}
|
|
|
|
|
|
returns.getRefundGoodsData(code, uid).then(result => {
|
|
|
// returns.getRefundGoodsData(code, uid).then(result => {
|
|
|
// res.display('index', {
|
|
|
// page: 'refund',
|
|
|
// content: result
|
|
|
// });
|
|
|
// }).catch(next);
|
|
|
|
|
|
Promise.all([returns.getRefundGoodsData(code, uid), mcHandler.getMeThumb()]).then(result => {
|
|
|
let refundGoods = result[0];
|
|
|
let thumb = result[1];
|
|
|
|
|
|
res.display('index', {
|
|
|
page: 'refund',
|
|
|
content: result
|
|
|
content: Object.assign({
|
|
|
nav: mcHandler.getMeCrumb('我的退/换货'),
|
|
|
navigation: mcHandler.getSideMenu('我的退/换货'),
|
|
|
banner: thumb
|
|
|
}, refundGoods)
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -85,10 +99,17 @@ const refundDetail = (req, res, next) => { |
|
|
return next();
|
|
|
}
|
|
|
|
|
|
returns.getRefundDetailData(applyId, uid).then(result => {
|
|
|
Promise.all([returns.getRefundDetailData(applyId, uid), mcHandler.getMeThumb()]).then(result => {
|
|
|
let refundDetailData = result[0];
|
|
|
let thumb = result[1];
|
|
|
|
|
|
res.display('index', {
|
|
|
page: 'refund-detail',
|
|
|
content: result
|
|
|
content: Object.assign({
|
|
|
nav: mcHandler.getMeCrumb('我的退/换货'),
|
|
|
navigation: mcHandler.getSideMenu('我的退/换货'),
|
|
|
banner: thumb
|
|
|
}, refundDetailData)
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -100,15 +121,18 @@ const exchange = (req, res, next) => { |
|
|
const code = parseInt(req.query.orderCode, 10);
|
|
|
const uid = req.user.uid;
|
|
|
|
|
|
returns.getChangeGoodsList(code, uid).then(result => {
|
|
|
Promise.all([returns.getChangeGoodsList(code, uid), mcHandler.getMeThumb()]).then(result => {
|
|
|
let exchangeData = result[0];
|
|
|
let thumb = result[1];
|
|
|
|
|
|
res.display('index', {
|
|
|
page: 'exchange',
|
|
|
isMe: true,
|
|
|
content: Object.assign({
|
|
|
nav: mcHandler.getMeCrumb('我的退/换货'),
|
|
|
navigation: mcHandler.getSideMenu('我的退/换货'),
|
|
|
banner: 'http://placehold.it/{width}x{height}'
|
|
|
}, result)
|
|
|
banner: thumb
|
|
|
}, exchangeData)
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -136,7 +160,8 @@ const exchangeDeatail = (req, res) => { |
|
|
let id = parseInt(req.query.orderCode, 10),
|
|
|
uid = req.user.uid;
|
|
|
|
|
|
returns.getExchangeDetailData(id, uid).then(result => {
|
|
|
Promise.all([returns.getExchangeDetailData(id, uid), mcHandler.getMeThumb()]).then(result => {
|
|
|
let thumb = result[1];
|
|
|
|
|
|
res.display('index', {
|
|
|
page: 'exchange-detail',
|
...
|
...
|
@@ -144,14 +169,13 @@ const exchangeDeatail = (req, res) => { |
|
|
content: {
|
|
|
nav: mcHandler.getMeCrumb('我的退/换货'),
|
|
|
navigation: mcHandler.getSideMenu('我的退/换货'),
|
|
|
banner: 'http://placehold.it/{width}x{height}',
|
|
|
banner: thumb,
|
|
|
returns: {
|
|
|
title: '换货申请',
|
|
|
exchange: result.exchangeDetail
|
|
|
exchange: result[0].exchangeDetail
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
|