returns-api.js 1.25 KB
/**
 * 退换货API
 * @author: yyq<yanqing.yang@yoho.cn>
 * @date: 2016/9/05
 */
'use strict';

const api = global.yoho.API;

/**
 * 获取订单退货信息
 */
const getRefundGoodsAsync = (orderCode, uid) => {
    return api.get('', {
        method: 'app.refund.goodsList',
        order_code: orderCode,
        uid: uid
    }, {code: 200});
};

/**
 * 获取退货订单信息
 */
const getRefundDetailAsync = (id, uid) => {
    return api.get('', {
        method: 'app.refund.detail',
        id: id,
        uid: uid
    }, {code: 200});
};

/**
 * 获取订单换货信息
 */
const getExchangeGoodsAsync = (orderCode, uid) => {
    return api.get('', {
        method: 'app.change.goodsList',
        order_code: orderCode,
        uid: uid
    }, {code: 200});
};

/**
 * 获取商品信息
 */
const getProductDataAsync = (skn) => {
    return api.get('', {
        method: 'app.product.data',
        product_skn: skn
    }, {code: 200});
};

/**
 * 快递公司列表
 */
const getExpressCompanyAsync = () => {
    return api.get('', {
        method: 'app.express.getExpressCompany'
    }, {code: 200});
};

module.exports = {
    getRefundGoodsAsync,
    getRefundDetailAsync,
    getExchangeGoodsAsync,
    getProductDataAsync,
    getExpressCompanyAsync
};