refund.js
832 Bytes
/**
* 退换货 Model
* @type {Object}
*/
const api = global.yoho.API;
const refund = {
getOrderData(uid, orderId) {
return api.get('', {
method: 'app.refund.goodsList',
uid: uid,
order_code: orderId
}, {
cache: true,
code: 200
}).then(global.yoho.camelCase);
},
submitRefundData(uid, params) {
console.log(Object.assign({
method: 'app.refund.submit',
uid: uid,
}, params));
return api.post('', Object.assign({
method: 'app.refund.submit',
uid: uid,
}, params)).then(global.yoho.camelCase);
},
getExpressCompany() {
return api.get('', {
method: 'app.express.getExpressCompany'
});
}
};
module.exports = refund;