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.
58 lines
1.4 KiB
58 lines
1.4 KiB
/*
|
|
* @Author: ch
|
|
* @Date: 2022-03-29 17:38:17
|
|
* @LastEditors: ch
|
|
* @LastEditTime: 2022-04-08 15:43:29
|
|
* @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 {*} data
|
|
*/
|
|
export const ApiPostSubmitOrder = (data) =>
|
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/app/tradeOrder/submitOrder`, data));
|
|
|
|
/**
|
|
* 取消订单
|
|
* @param {*} data
|
|
*/
|
|
export const ApiPutCancelOrder = (data) =>
|
|
ToAsyncAwait(MsbRequestTkTk.post(`${BASE_URL}/app/tradeOrder/cancel`, data));
|
|
|
|
/**
|
|
* 获取支付参数
|
|
* @param {*} data
|
|
*/
|
|
export const ApiPostWxPay = (data) =>
|
|
ToAsyncAwait(MsbRequestTkTk.post(`${BASE_URL}/pay/wxPay/app`, data));
|
|
|
|
|