orderDetail.js
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const api = global.yoho.API;
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);
// if(orderDetail.virtualType && orderDetail.virtualType === 3) {
// orderDetail = _.assign(orderDetail, {
// isVirtual: true,
// mobile: result.data.mobile
// })
// }
// orderDetail = _.assign(orderDetail, {
// addressAll: orderDetail.area + orderDetail.address
// // createTime: date('Y-m-d H:i:s', orderDetail.createTime)
// })
return orderDetail;
});
};
module.exports = {
orderDetail
};