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.
36 lines
726 B
36 lines
726 B
4 months ago
|
import request from '@/utils/request'
|
||
|
|
||
|
// api地址
|
||
|
const api = {
|
||
|
orderInfo: 'cashier/orderInfo',
|
||
|
orderPay: 'cashier/orderPay',
|
||
|
tradeQuery: 'cashier/tradeQuery',
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取支付订单的信息
|
||
|
* @param {Number} orderId
|
||
|
* @param {Object} param
|
||
|
*/
|
||
|
export function orderInfo(orderId, param) {
|
||
|
return request.get(api.orderInfo, { orderId, ...param })
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 确认支付
|
||
|
* @param {Number} orderId
|
||
|
* @param {Object} data
|
||
|
*/
|
||
|
export function orderPay(orderId, data) {
|
||
|
return request.post(api.orderPay, { orderId, ...data })
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 交易查询
|
||
|
* 查询第三方支付订单是否付款成功
|
||
|
* @param {Object} param
|
||
|
*/
|
||
|
export function tradeQuery(param) {
|
||
|
return request.get(api.tradeQuery, param)
|
||
|
}
|