Authored by zhangxiaoru

exchange

... ... @@ -109,10 +109,10 @@ const getProductInfo = (req, res, next) => {
};
const exchangeDeatail = (req, res) => {
let id = 125946;
let uid = 8050560;
// let id = 125946;
// let uid = 8050560;
returns.getExchangeDetailData(id, uid).then(result => {
// returns.getExchangeDetailData(id, uid).then(result => {
res.display('index', {
page: 'exchange-detail',
isMe: true,
... ... @@ -133,13 +133,14 @@ const exchangeDeatail = (req, res) => {
num: '',
reasonName: '',
newColorName: '蓝色',
newSizeName: 'M',
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};
});
};
... ...