orderDetail.js 1.02 KB
'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
};