【功能优化】支付:查询支付订单时,增加 sync 主动轮询,解决支付宝、微信存在延迟的问题
parent
da45ee034c
commit
74e04279c2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue