fix:【pay 支付】收银界面,关闭后清理定时轮询

This commit is contained in:
YunaiV
2025-09-20 12:45:40 +08:00
parent 65d24fa6be
commit ca3fae4611
2 changed files with 10 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { PayOrderApi } from '#/api/pay/order';
import { onMounted, ref } from 'vue';
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
@@ -294,6 +294,10 @@ function goReturnUrl(payResult: string) {
onMounted(async () => {
await getDetail();
});
onBeforeUnmount(() => {
clearQueryInterval();
});
</script>
<template>
<Page auto-content-height>

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { PayOrderApi } from '#/api/pay/order';
import { onMounted, ref } from 'vue';
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
@@ -294,6 +294,10 @@ function goReturnUrl(payResult: string) {
onMounted(async () => {
await getDetail();
});
onBeforeUnmount(() => {
clearQueryInterval();
});
</script>
<template>
<Page auto-content-height>