lex 1 year ago
parent
commit
dcc99a54eb
3 changed files with 19 additions and 9 deletions
  1. 0 0
      dist/app.0e7138b0e1fbba0f87bd.js
  2. 1 0
      dist/index.html
  3. 18 9
      src/App.vue

File diff suppressed because it is too large
+ 0 - 0
dist/app.0e7138b0e1fbba0f87bd.js


File diff suppressed because it is too large
+ 1 - 0
dist/index.html


+ 18 - 9
src/App.vue

@@ -1,13 +1,15 @@
 <template>
   <div id="app">
-    <transition name="fade">
-      <keep-alive>
-        <router-view v-if="$route.meta.keepAlive" />
-      </keep-alive>
-    </transition>
-    <transition name="fade">
-      <router-view v-if="!$route.meta.keepAlive" />
-    </transition>
+    <div v-if="!loading">
+      <transition name="fade">
+        <keep-alive>
+          <router-view v-if="$route.meta.keepAlive" />
+        </keep-alive>
+      </transition>
+      <transition name="fade">
+        <router-view v-if="!$route.meta.keepAlive" />
+      </transition>
+    </div>
   </div>
 </template>
 
@@ -15,12 +17,18 @@
 import { queryTeacherInfo } from "@/api/app";
 export default {
   name: "app",
+  data() {
+    return {
+      loading: true,
+    };
+  },
   async created() {
     const whiteList = ["#/order"];
     // const routePath = this.$route.path;
     const locationHash = window.location.hash;
     // console.log(this.$route.path, locationHash);
-    if (locationHash.indexOf('#/order') == -1) {
+    this.loading = true;
+    if (locationHash.indexOf("#/order") == -1) {
       try {
         let Authorization = this.getQueryVariable("Authorization") || null;
         if (window.location.hash.indexOf("+") >= 0) {
@@ -47,6 +55,7 @@ export default {
         console.log(e);
       }
     }
+    this.loading = false;
   },
   async mounted() {
     if (document.querySelector("#m_loading")) {

Some files were not shown because too many files changed in this diff