修复文件上传和下单支付流程

This commit is contained in:
yml2213
2026-06-12 19:42:24 +08:00
parent 6ada7393ef
commit a615100730
7 changed files with 61 additions and 11 deletions
@@ -90,6 +90,7 @@ const activeNames = ref<string[]>([])
const showDisputePopup = ref(false)
const showCounterPopup = ref(false)
const showRejectPopup = ref(false)
let autoPayHandled = false
const isOwner = computed(() => order.value?.owner_id === session.userId)
const isRenter = computed(() => order.value?.renter_id === session.userId)
@@ -139,6 +140,16 @@ async function loadOrder() {
handoffRecords.value = await fetchHandoffRecords(String(route.params.id))
hydrateResourceUsage()
hydrateCounterForm()
if (
!autoPayHandled &&
route.query.pay === '1' &&
order.value?.status === 'pending_payment' &&
order.value?.renter_id === session.userId
) {
autoPayHandled = true
void router.replace({ path: route.path })
void handlePay()
}
} catch {
showToast({ message: '加载订单失败', icon: 'cross' })
} finally {