Authored by zhangxiaoru

detail

... ... @@ -2,21 +2,22 @@
const api = global.yoho.API;
const _ = require('lodash');
const config = global.yoho.config;
const helpers = global.yoho.helpers;
const camelCase = global.yoho.camelCase;
// const _ = require('lodash');
// const config = global.yoho.config;
// const helpers = global.yoho.helpers;
// const camelCase = global.yoho.camelCase;
const orderDetail = (uid, orderCode) => {
let finalResult = {};
return api.get('', {
method: 'app.SpaceOrders.detail',
uid: uid,
order_code: orderCode
}).then((result) => {
let orderDetail = camelCase(result.data);
//console.log(result);
// let orderDetail = camelCase(result.data);
// console.log(result);
// if(orderDetail.virtualType && orderDetail.virtualType === 3) {
// orderDetail = _.assign(orderDetail, {
... ... @@ -30,7 +31,7 @@ const orderDetail = (uid, orderCode) => {
// // createTime: date('Y-m-d H:i:s', orderDetail.createTime)
// })
return orderDetail;
return result;
});
};
... ...