Authored by zhangxiaoru

exchange

... ... @@ -109,37 +109,38 @@ const getProductInfo = (req, res, next) => {
};
const exchangeDeatail = (req, res) => {
let id = 125946;
let uid = 8050560;
returns.getExchangeDetailData(id, uid).then(result => {
res.display('index', {
page: 'exchange-detail',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('我的退/换货'),
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: 'http://placehold.it/{width}x{height}',
exchange: {
finish: true,
way: '上门送货',
goodsList: [
{
goodsImage: '',
productName: 'fdefwfwefwrefverfref',
colorName: '',
sizeName: '',
num: '',
reasonName: '',
newColorName: '蓝色',
newSizeName: 'M',
}
]
}
// let id = 125946;
// let uid = 8050560;
// returns.getExchangeDetailData(id, uid).then(result => {
res.display('index', {
page: 'exchange-detail',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('我的退/换货'),
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: 'http://placehold.it/{width}x{height}',
exchange: {
finish: true,
way: '上门送货',
goodsList: [
{
goodsImage: '',
productName: 'fdefwfwefwrefverfref',
colorName: '',
sizeName: '',
num: '',
reasonName: '',
newColorName: '蓝色',
newSizeName: 'M'
}
]
}
});
}
});
// });
};
module.exports = {
... ...
... ... @@ -11,7 +11,8 @@ const camelCase = global.yoho.camelCase;
const _ = require('lodash');
const mcHandler = require('./menu-crumb-handler');
const returnsAPI = require('./returns-api');
const logger = global.yoho.logger;
// const logger = global.yoho.logger;
const helpers = global.yoho.helpers;
... ... @@ -112,7 +113,7 @@ const _setDefaultStatus = (type) => {
};
return resData;
}
};
const _setReturnStatus = (list, half) => {
let resData = {};
... ... @@ -229,11 +230,10 @@ const _setExchangeDetailData = (data) => {
list.auditSuccess = true;
break;
case 40:
resData.finish = true;
list.finish = true;
list.auditSuccess = true;
break;
default:
resData.audit = true;
break;
}
... ... @@ -275,7 +275,7 @@ const getRefundDetailData = (applyId, uid) => {
if (result.data) {
// console.log(_setRefundDetailData(result.data));
Object.assign(resData.refundDetail, _setReturnStatus(result.data.statusList));//头部
Object.assign(resData.refundDetail, _setReturnStatus(result.data.statusList));// 头部
Object.assign(resData.refundDetail, _setRefundDetailData(result.data));
}
... ... @@ -360,14 +360,14 @@ const getExchangeDetailData = (id, uid) => {
if (result.data) {
// console.log(_setRefundDetailData(result.data));
Object.assign(exchangeData.exchangeDetail, _setReturnStatus(result.data.statusList));//头部
Object.assign(exchangeData.exchangeDetail, _setReturnStatus(result.data.statusList));// 头部
Object.assign(exchangeData.exchangeDetail, _setExchangeDetailData(result.data));
// Object.assign(exchangeData.exchangeDetail, camelCase(result.data));
}
console.log(exchangeData)
// console.log(exchangeData);
return {returns: exchangeData};
});
};
... ...