orderDetail.js 1.01 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) => {

    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 result;
    });
};

module.exports = {
    orderDetail
};