2025-09-15
This commit is contained in:
24
api/payment.js
Normal file
24
api/payment.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { http } from "../util/api"
|
||||
|
||||
// 支付相关API
|
||||
export const paymentAPI = {
|
||||
// 获取支付方式
|
||||
getMethods: () => http.get('/payment/methods'),
|
||||
|
||||
// 创建支付订单
|
||||
createOrder: (data) => http.post('/payment/create-order', data),
|
||||
|
||||
// 查询支付状态
|
||||
queryStatus: (outTradeNo) => http.get(`/payment/query-status/${outTradeNo}`),
|
||||
|
||||
getOrder: () => http.get('/payment/check-status'),
|
||||
|
||||
// 获取支付记录
|
||||
getOrders: (params = {}) => http.get('/payment/orders', {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
paymentAPI
|
||||
}
|
||||
Reference in New Issue
Block a user