Browse Source

fix(Student): 修复iframe链接中setWorkPage替换为workPage的问题

确保iframe链接中的setWorkPage被正确替换为workPage,以保持页面功能正常
lsc 1 month ago
parent
commit
8b2a1bcc9d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/views/Student/index.vue

+ 3 - 0
src/views/Student/index.vue

@@ -1325,6 +1325,9 @@ const processIframeLinks = async () => {
                 const targetDomain = `cocorobo.${currentVersion}`
                 iframeSrc = iframeSrc.replace(versionMap[currentVersion], targetDomain)
 
+                if (iframeSrc.includes('setWorkPage')) {
+                  iframeSrc = iframeSrc.replace(/setWorkPage/g, 'workPage')
+                }
 
                 if (iframeSrc.includes('workPage')) {
                   hasIframe = true