Browse Source

还原sandbox

11wqe1 2 weeks ago
parent
commit
d339983434

+ 2 - 5
src/components/easy/studyStudent.vue

@@ -250,7 +250,7 @@
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
                       v-else
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -1506,7 +1506,7 @@
             style="width: 100%; height: 100%; border: none"
             security="restricted"
             v-else-if="fulltype == 2"
-            :sandbox="isCoco"
+            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
             :src="fullUrl"
           ></iframe>
         <pdf v-else-if="fulltype == 3" :pdfUrl="fullUrl" style="width: 100%; height: 100%; overflow: auto"></pdf>
@@ -7764,9 +7764,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 3 - 6
src/components/easy2/studyStudent.vue

@@ -620,7 +620,7 @@
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
                       v-else
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -13973,7 +13973,7 @@
             style="width: 100%; height: 100%; border: none"
             security="restricted"
             v-else-if="(fulltype == 2 || fulltype == 4)"
-            :sandbox="isCoco"
+            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
             :src="fullUrl"
           ></iframe>
         <pdf
@@ -13985,7 +13985,7 @@
           style="width: 100%; height: 100%; border: none"
           security="restricted"
           v-if="(fulltype == 16)"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
           :src="fullUrl"
         ></iframe>
 
@@ -26447,9 +26447,6 @@ export default {
     }
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     renderedFormula2() {
       return function(val){
         // 处理换行符和HTML实体

+ 3 - 6
src/components/easy3/studyStudent.vue

@@ -632,7 +632,7 @@
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
                       v-else
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
 
@@ -10612,7 +10612,7 @@
           style="width: 100%; height: 100%; border: none"
           security="restricted"
           v-else-if="(fulltype == 2 || fulltype == 4)"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
           :src="fullUrl"
         ></iframe>
         <pdf
@@ -10624,7 +10624,7 @@
           style="width: 100%; height: 100%; border: none"
           security="restricted"
           v-if="(fulltype == 16)"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
           :src="fullUrl"
         ></iframe>
 
@@ -21764,9 +21764,6 @@ export default {
     }
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     renderedFormula2() {
       return function(val){
         // 处理换行符和HTML实体

+ 2 - 5
src/components/noTerminal/studyStudent.vue

@@ -239,7 +239,7 @@
                   </div>
                   <div class="wheel" v-else-if="showType == 2" style="width: 95%; margin: 0 auto">
                     <iframe style="width: 100%; height: 100%; border: none" security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"></iframe>
                   </div>
                   <div class="wheel" v-if="showType == 3" style="width: 95%; margin: 0 auto">
@@ -4073,7 +4073,7 @@
         </div>
         <iframe v-else-if="fulltype == 2" style="width: 100%; height: 100%; border: none" :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"></iframe>
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"></iframe>
         <pdf v-else-if="fulltype == 3" :pdfUrl="fullUrl" style="width: 100%; height: 100%; overflow: auto"></pdf>
         <div class="wheel" v-if="fulltype == 1" style="
                                                 box-shadow: 0 0 6px 1px #f2f2f2;
@@ -10938,9 +10938,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 2 - 5
src/components/student/studyStudent.vue

@@ -561,7 +561,7 @@
                       style="width: 100%; height: 100%; border: none"
                       :src="chapterlist[chapterIndex].src"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"
                     ></iframe>
                   </div>
                   <div
@@ -1080,7 +1080,7 @@
                             style="width: 100%; height: 100%; border: none"
                             :src="tool.toolData[tool.sourceIndex].src"
                             security="restricted"
-                            :sandbox="isCoco"
+                            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"
                           ></iframe>
                         </div>
                         <div
@@ -4053,9 +4053,6 @@ export default {
     this.timer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 2 - 5
src/components/studio/studyStudent.vue

@@ -263,7 +263,7 @@
                     style="height: 650px; width: 95%; margin: 0 auto">
                     <iframe style="width: 100%; height: 100%; border: none" :src="chapterlist[chapterIndex].src"
                       security="restricted"
-                      :sandbox="isCoco"></iframe>
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"></iframe>
                   </div>
                   <div class="wheel" v-if="chapterlist[chapterIndex].type == 9"
                     style="height: 650px; width: 95%; margin: 0 auto">
@@ -569,7 +569,7 @@
                           style="height: 650px; width: 98%">
                           <iframe style="width: 100%; height: 100%; border: none"
                             :src="tool.toolData[tool.sourceIndex].src" security="restricted"
-                            :sandbox="isCoco"></iframe>
+                            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"></iframe>
                         </div>
                         <div class="wheel" v-if="tool.toolData[tool.sourceIndex].type == 9"
                           style="height: 650px; width: 98%">
@@ -2880,9 +2880,6 @@ export default {
     this.timer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 4 - 7
src/components/studyStudent.vue

@@ -596,7 +596,7 @@
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
                       v-else
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -10534,7 +10534,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe> -->
           <iframe
             style="width: 100%; height: 100%; border: none"
@@ -10546,7 +10546,7 @@
             style="width: 100%; height: 100%; border: none"
             security="restricted"
             v-else-if="(fulltype == 2 || fulltype == 4)"
-            :sandbox="isCoco"
+            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
             :src="fullUrl"
           ></iframe>
         <pdf
@@ -10558,7 +10558,7 @@
           style="width: 100%; height: 100%; border: none"
           security="restricted"
           v-if="(fulltype == 16)"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
           :src="fullUrl"
         ></iframe>
 
@@ -21778,9 +21778,6 @@ export default {
         }
       }
     },
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     isAndroid() {
       return /Android/i.test(navigator.userAgent);
     },

+ 3 - 6
src/components/studySutdentClass/studyStudent.vue

@@ -631,7 +631,7 @@
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
                       v-else
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -13784,7 +13784,7 @@
             style="width: 100%; height: 100%; border: none"
             security="restricted"
             v-else-if="(fulltype == 2 || fulltype == 4)"
-            :sandbox="isCoco"
+            sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
             :src="fullUrl"
           ></iframe>
         <pdf
@@ -13796,7 +13796,7 @@
           style="width: 100%; height: 100%; border: none"
           security="restricted"
           v-if="(fulltype == 16)"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
           :src="fullUrl"
         ></iframe>
 
@@ -25801,9 +25801,6 @@ export default {
 		this.updateSplitScreenData(1);
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     renderedFormula2() {
       return function(val){
         // 处理换行符和HTML实体

+ 2 - 5
src/components/trainCourse/easy2/studyStudent.vue

@@ -568,7 +568,7 @@
                     <iframe
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -9592,7 +9592,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe>
         <pdf
           v-else-if="fulltype == 3"
@@ -19349,9 +19349,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     getHeight(){
       return document.querySelectorAll(".engUpTop")[0].offsetHeight;
     },

+ 2 - 5
src/components/trainCourse/easy3/studyStudent.vue

@@ -565,7 +565,7 @@
                     <iframe
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -9579,7 +9579,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe>
         <pdf
           v-else-if="fulltype == 3"
@@ -19341,9 +19341,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     getHeight(){
       return document.querySelectorAll(".engUpTop")[0].offsetHeight;
     },

+ 2 - 5
src/components/trainCourse/studyStudent.vue

@@ -579,7 +579,7 @@
                     <iframe
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -9564,7 +9564,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe>
         <pdf
           v-else-if="fulltype == 3"
@@ -19318,9 +19318,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 2 - 5
src/components/横板极简和任务模式/easy2/studyStudent.vue

@@ -481,7 +481,7 @@
                     <iframe
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -10374,7 +10374,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe>
         <pdf
           v-else-if="fulltype == 3"
@@ -18865,9 +18865,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c

+ 2 - 5
src/components/横板极简和任务模式/easy3/studyStudent.vue

@@ -462,7 +462,7 @@
                     <iframe
                       style="width: 100%; height: 100%; border: none"
                       security="restricted"
-                      :sandbox="isCoco"
+                      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups"
                       :src="pptImgUrl1"
                     ></iframe>
                   </div>
@@ -10394,7 +10394,7 @@
           style="width: 100%; height: 100%; border: none"
           :src="fullUrl"
           security="restricted"
-          :sandbox="isCoco"
+          sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts  allow-popups"
         ></iframe>
         <pdf
           v-else-if="fulltype == 3"
@@ -18755,9 +18755,6 @@ export default {
     this.opertimer = null;
   },
   computed: {
-    isCoco(){
-      return window.location.href.includes("cocorobo") ? '' : 'allow-top-navigation allow-same-origin allow-forms allow-scripts' 
-    },
     contentConvent() {
       return function (c) {
         return c