|
@@ -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")) {
|