Ver código fonte

优化Safari浏览器支付页面打开逻辑,使用setTimeout和window.open替代location.href,提升代码可读性和兼容性。

wuyi 3 meses atrás
pai
commit
152cd8fe71
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/views/VideoPlayer.vue

+ 2 - 1
src/views/VideoPlayer.vue

@@ -716,7 +716,8 @@ const openPaymentPage = (url: string) => {
 
   if (isSafari) {
     // Safari浏览器:使用location.href跳转
-    window.location.href = url;
+    setTimeout(() => window.open(url, "_blank"));
+    // window.location.href = url;
   } else {
     // 其他浏览器:正常使用window.open
     window.open(url, "_blank");