接入订单支付与钱包充值前端入口

This commit is contained in:
yml
2026-05-24 16:38:26 +08:00
parent c4cfe6dd79
commit 1693ee3167
10 changed files with 155 additions and 11 deletions
+5
View File
@@ -50,6 +50,11 @@ export async function createOrder(listingId: number) {
return data.data
}
export async function payOrder(id: number) {
const { data } = await apiClient.post<ApiResponse<{ paid: boolean }>>(`/orders/${id}/pay`)
return data.data
}
export async function fetchOrders() {
const { data } = await apiClient.get<ApiResponse<{ items: Order[] }>>('/orders')
return data.data.items