lsc před 6 dny
rodič
revize
120eec7577
1 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 7 1
      src/views/Student/index.vue

+ 7 - 1
src/views/Student/index.vue

@@ -771,10 +771,16 @@ const processIframeLinks = async () => {
                     }
 
                     // 构建新的URL
-                    const newUrl = `${baseUrl}#${newHash}`
+                    let newUrl = `${baseUrl}#${newHash}`
 
                     console.log(`幻灯片 ${slideIndex + 1} 的iframe链接已更新:`, newUrl)
 
+                    if (window.location.href.includes('beta') && !newUrl.includes('beta')) {
+                      newUrl = newUrl.replace('pbl.cocorobo.cn', 'beta.pbl.cocorobo.cn')
+                    }
+                    else if (newUrl.includes('beta') && !window.location.href.includes('beta')) {
+                      newUrl = newUrl.replace('beta.pbl.cocorobo.cn', 'pbl.cocorobo.cn')
+                    }
                     // 返回更新后的元素
                     return {
                       ...element,