lsc vor 3 Jahren
Ursprung
Commit
cf79f645df

+ 2 - 2
dist/index.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>cocoroboblockly</title><link href=/static/css/app.e34c63dabe5713cdc0eeafa1f0c162ea.css rel=stylesheet></head><style>@charset "utf-8";
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>cocoroboblockly</title><link href=/static/css/app.f0ad6f05143a21a12b914de13b2f0d27.css rel=stylesheet></head><style>@charset "utf-8";
 
 
   div::-webkit-scrollbar {
   div::-webkit-scrollbar {
     /*滚动条整体样式*/
     /*滚动条整体样式*/
@@ -42,4 +42,4 @@
     height: 100%;
     height: 100%;
     width: 100%;
     width: 100%;
     background: #e6eaf0;
     background: #e6eaf0;
-  }</style><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.c45496ecc850f4852679.js></script><script type=text/javascript src=/static/js/app.a64ba05bb3fe746b6eff.js></script></body></html>
+  }</style><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.c45496ecc850f4852679.js></script><script type=text/javascript src=/static/js/app.3f0f82b20a1681be712d.js></script></body></html>

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.f0ad6f05143a21a12b914de13b2f0d27.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/css/app.f0ad6f05143a21a12b914de13b2f0d27.css.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.3f0f82b20a1681be712d.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.3f0f82b20a1681be712d.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.a64ba05bb3fe746b6eff.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.a64ba05bb3fe746b6eff.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map


+ 1 - 1
src/App.vue

@@ -92,7 +92,7 @@
 					.catch((err) => {
 					.catch((err) => {
 						// _this.props.history.push("/login");
 						// _this.props.history.push("/login");
 						// window.alert(err.response.data)
 						// window.alert(err.response.data)
-						// window.location.href = "https://edu.cocorobo.cn/course/login?type=1";
+						window.location.href = "https://edu.cocorobo.cn/course/login?type=1";
 					});
 					});
 			},
 			},
 			logout() {
 			logout() {

+ 14 - 7
src/components/unity.vue

@@ -24,8 +24,7 @@
         </category>
         </category>
       </xml>
       </xml>
     </div>
     </div>
-    <iframe src="https://meta.cocorobo.cn" frameborder="0"></iframe>
-
+    <iframe src="https://meta.cocorobo.cn" frameborder="0" ref="unityvue"></iframe>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -56,6 +55,7 @@ export default {
     return {
     return {
       that: this,
       that: this,
       workspace: null,
       workspace: null,
+      type: this.$route.query.type,
     };
     };
   },
   },
 
 
@@ -175,29 +175,36 @@ export default {
       var _code = "police=1;";
       var _code = "police=1;";
       return _code;
       return _code;
     };
     };
+    var that = this;
+    window.addEventListener("message", function (e) {
+      // 监听 message 事件
+      if (e.data.success) {
+        that.$refs.unityvue.contentWindow.postMessage({ type: that.type }, "*");
+      }
+    });
   },
   },
 };
 };
 </script>
 </script>
 
 
 <style>
 <style>
-.abody{
+.abody {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
   display: flex;
   display: flex;
 }
 }
 
 
 #blocklyDiv {
 #blocklyDiv {
-width: 100%;
+  width: 100%;
   height: 100%;
   height: 100%;
 }
 }
 
 
-.ablockly{
+.ablockly {
   width: 50%;
   width: 50%;
   height: 100%;
   height: 100%;
 }
 }
 
 
-.abody iframe{
-     width: 50%;
+.abody iframe {
+  width: 50%;
   height: 100%;
   height: 100%;
 }
 }
 
 

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.