ソースを参照

fix 考试页面可能reload导致的问题

Michael Wang 6 年 前
コミット
75af0d79c4
2 ファイル変更4 行追加3 行削除
  1. 0 3
      src/features/Login/Login.vue
  2. 4 0
      src/main.js

+ 0 - 3
src/features/Login/Login.vue

@@ -146,9 +146,6 @@ export default {
   async mounted() {
     await this.checkNewVersion();
   },
-  beforeCreate() {
-    document.getElementById("app-placeholder").remove();
-  },
   async created() {
     if (this.LOGIN_ID_DOMAINS.includes(this.schoolDomain)) {
       this.loginType = "STUDENT_IDENTITY_NUMBER";

+ 4 - 0
src/main.js

@@ -77,6 +77,10 @@ if (process.env.NODE_ENV === "development") {
 }
 
 Vue.mixin({
+  beforeCreate() {
+    if (document.getElementById("app-placeholder"))
+      document.getElementById("app-placeholder").remove();
+  },
   mounted() {
     // console.log("mixin hook called");
     [...document.getElementsByTagName("a")].forEach(e => {