Commit 74e04279 by YunaiV

【功能优化】支付:查询支付订单时,增加 sync 主动轮询,解决支付宝、微信存在延迟的问题

parent da45ee03
......@@ -84,8 +84,14 @@ export const getOrderPage = async (params: OrderPageReqVO) => {
}
// 查询详情支付订单
export const getOrder = async (id: number) => {
return await request.get({ url: '/pay/order/get?id=' + id })
export const getOrder = async (id: number, sync?: boolean) => {
return await request.get({
url: '/pay/order/get',
params: {
id,
sync
}
})
}
// 获得支付订单的明细
......
......@@ -231,7 +231,7 @@ const getDetail = async () => {
goReturnUrl('cancel')
return
}
const data = await PayOrderApi.getOrder(id.value)
const data = await PayOrderApi.getOrder(id.value, true)
payOrder.value = data
// 1.2 无法查询到支付信息
if (!data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment