You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/common/api/order.js

136 lines
3.4 KiB

3 years ago
/*
* @Author: ch
* @Date: 2022-03-29 17:38:17
* @LastEditors: ch
3 years ago
* @LastEditTime: 2022-05-10 16:14:53
3 years ago
* @Description: file content
*/
3 years ago
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
3 years ago
const BASE_URL = '/mall/trade';
3 years ago
/**
* 获取订单
* @param {*} params
*/
export const ApiGetOrderList = (params) =>
3 years ago
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/page`, params));
3 years ago
/**
* 获取立即购买预订单
3 years ago
* @param {*} data
*/
export const ApiGetBeforeOrder = (data) =>
3 years ago
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/buyAdvanceOrder`, data));
3 years ago
/**
* 获取购物车预订单
* @param {*} data
*/
export const ApiGetBeforeCartOrder = (data) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/cartAdvanceOrder`, data));
3 years ago
/**
* 订单详情
* @param {*} id
*/
export const ApiGetOrderDetail = (id) =>
3 years ago
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/${id}`));
3 years ago
/**
* 订单商品详情信息
* @param {*} orderProductId
*/
export const ApiGetOrderProductDetail = ({orderProductId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/product/${orderProductId}`));
3 years ago
/**
* 提交订单
* @param {*} data
*/
export const ApiGetOrderPaySatus = ({orderId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/payResult/${orderId}`));
/**
* 获取物流信息
3 years ago
* @param {*} orderId
*/
export const ApiGetOrderLogistics = ({orderId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/logistics/${orderId}`));
3 years ago
/**
* 确认收货
* @param {*} orderId
*/
export const ApiPutOrderReceive = (params) =>
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/tradeOrder/receive`, params));
3 years ago
/**
* 提交订单
* @param {*} data
*/
export const ApiPostSubmitOrder = (data) =>
3 years ago
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/app/tradeOrder/submitOrder`, data));
3 years ago
/**
* 取消订单
* @param {*} data
*/
export const ApiPutCancelOrder = (data) =>
3 years ago
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/tradeOrder/cancel`, data));
3 years ago
/**
* 获取订单统计数据
*/
3 years ago
export const ApiGetOrderStatistics = () =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/statistics`));
3 years ago
/**
* 申请售后
* @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/refundInfo`, params));
3 years ago
/**
* 售后物流公司
* @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));