Просмотр исходного кода

fix(统一支付前端): 迟到的 404 不停掉新单轮询

alphaH 1 неделя назад
Родитель
Сommit
0177dec966
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      frontend/src/views/module_payment/unified/cashier/index.vue

+ 2 - 1
frontend/src/views/module_payment/unified/cashier/index.vue

@@ -592,8 +592,9 @@ async function poll() {
       response?: { status?: number };
     };
     if (String(e?.data?.code) === "404" || e?.response?.status === 404) {
-      stopPolling();
+      // 迟到的 404 不能停掉新单的表:先确认屏幕上还是同一单,再停表/置失效。
       if (order.value?.order_no === orderNo) {
+        stopPolling();
         pollGone.value = true;
       }
       return;