|
|
|
/*
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-03-29 17:38:17
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-04-15 11:29:32
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
|
|
|
|
|
|
|
|
const BASE_URL = '/mall/trade';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取订单
|
|
|
|
* @param {*} params
|
|
|
|
*/
|
|
|
|
export const ApiGetOrderList = (params) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/page`, params));
|
|
|
|
/**
|
|
|
|
* 获取立即购买预订单
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiGetBeforeOrder = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/buyAdvanceOrder`, data));
|
|
|
|
/**
|
|
|
|
* 获取购物车预订单
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiGetBeforeCartOrder = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/cartAdvanceOrder`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 订单详情
|
|
|
|
* @param {*} id
|
|
|
|
*/
|
|
|
|
export const ApiGetOrderDetail = (id) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/${id}`));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 订单商品详情信息
|
|
|
|
* @param {*} orderProductId
|
|
|
|
*/
|
|
|
|
export const ApiGetOrderProductDetail = ({orderProductId}) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/product/${orderProductId}`));
|
|
|
|
/**
|
|
|
|
* 提交订单
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPostSubmitOrder = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/app/tradeOrder/submitOrder`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 取消订单
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPutCancelOrder = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/app/tradeOrder/cancel`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取支付参数
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPostWxPay = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 申请售后
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPostApplySaleAfter = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/app/refundOrder/applyRefund`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 修改售后申请
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPostEditSaleAfter = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/refundOrder/updateRefund`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 撤销售后申请
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPostCancelSaleAfter = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/refundOrder/cancelRefund`, data));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 售后订单列表
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiGetSaleAfterOrderList = (params) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/page`, params));
|
|
|
|
/**
|
|
|
|
* 售后订单详情
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiGetSaleAfterOrderDetail = (params) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/${params.refundId}`));
|
|
|
|
/**
|
|
|
|
* 售后物流公司
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiGetLogisticsCompanylist = (params) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/logisticsCompany`));
|
|
|
|
/**
|
|
|
|
* 售后提交物流信息
|
|
|
|
* @param {*} data
|
|
|
|
*/
|
|
|
|
export const ApiPutLogisticsInfo = (data) =>
|
|
|
|
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/refundOrder/completeRefund`, data));
|