Explorar el Código

修改登录问题

lex hace 1 año
padre
commit
fc8d5370b0
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      src/page-instrument/App.tsx

+ 7 - 1
src/page-instrument/App.tsx

@@ -28,7 +28,13 @@ export default defineComponent({
             if (/(192|localhost)/.test(location.origin)) {
               return;
             }
-            window.location.href = `${location.origin}/classroom`;
+            // 判断是否在应用中
+            window.parent.postMessage(
+              {
+                api: "onLogin",
+              },
+              "*"
+            );
           }
           return;
         }