订单退款倒计时刷新改为同步

This commit is contained in:
wangxiaowei
2025-12-26 14:45:40 +08:00
parent 5c95b26665
commit c42e4af2bd

View File

@ -97,11 +97,11 @@ export async function handleRefundOrderHooks(id: number, orderType: number) {
await refund({ id: res.id }) await refund({ id: res.id })
toast.info('退款成功,注意查收') toast.info('退款成功,注意查收')
// 退款延迟-1.5秒钟后再执行 // 退款延迟-1.5秒钟后再执行(同步等待)
setTimeout(() => { await new Promise(resolve => setTimeout(resolve, 1500));
uni.hideLoading() console.log("🚀 ~ handleRefundOrderHooks ~ 退款延迟:")
return true uni.hideLoading();
}, 1500) return true;
} catch (error) { } catch (error) {
toast.info('退款失败') toast.info('退款失败')
return false return false