|
@@ -60,20 +60,26 @@ export default defineComponent({
|
|
|
) {
|
|
|
setLoginError();
|
|
|
} else {
|
|
|
- setLogout();
|
|
|
-
|
|
|
// 判断是否登录状态
|
|
|
if (query.platform) {
|
|
|
// 判断是否在应用中
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- api: 'onLogin'
|
|
|
- },
|
|
|
- '*'
|
|
|
- );
|
|
|
- setTimeout(() => {
|
|
|
- window.location.href = `${location.origin}/classroom`;
|
|
|
- }, 500);
|
|
|
+ if(window.parent && window.parent !== window) {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ api: 'onLogin'
|
|
|
+ },
|
|
|
+ '*'
|
|
|
+ );
|
|
|
+ setTimeout(() => {
|
|
|
+ window.location.href = `${location.origin}/classroom`;
|
|
|
+ }, 500);
|
|
|
+ } else {
|
|
|
+ window.location.href = `${location.origin}/classroom`;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ setLogout();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|