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

pull/554/MERGE
YunaiV 2024-09-24 09:05:08 +08:00
parent da45ee034c
commit 74e04279c2
2 changed files with 9 additions and 3 deletions

View File

@ -84,8 +84,14 @@ export const getOrderPage = async (params: OrderPageReqVO) => {
} }
// 查询详情支付订单 // 查询详情支付订单
export const getOrder = async (id: number) => { export const getOrder = async (id: number, sync?: boolean) => {
return await request.get({ url: '/pay/order/get?id=' + id }) return await request.get({
url: '/pay/order/get',
params: {
id,
sync
}
})
} }
// 获得支付订单的明细 // 获得支付订单的明细

View File

@ -231,7 +231,7 @@ const getDetail = async () => {
goReturnUrl('cancel') goReturnUrl('cancel')
return return
} }
const data = await PayOrderApi.getOrder(id.value) const data = await PayOrderApi.getOrder(id.value, true)
payOrder.value = data payOrder.value = data
// 1.2 // 1.2
if (!data) { if (!data) {