Browse Source

Merge branch '12/16SAAS' into iterationApp

lex-xin 3 years ago
parent
commit
5b2909a1e4
4 changed files with 8 additions and 3 deletions
  1. 0 0
      dist/app.cc0e2997e5f03b0e757c.js
  2. 0 0
      dist/app.de5d32b1b071615207cc.js
  3. 0 0
      dist/index.html
  4. 8 3
      src/App.vue

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


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


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


+ 8 - 3
src/App.vue

@@ -16,8 +16,13 @@ import { queryTeacherInfo } from "@/api/app";
 export default {
 export default {
   name: "app",
   name: "app",
   async created() {
   async created() {
+    const whiteList = ["/order"];
+    const routePath = this.$route.path;
+    if(whiteList.includes(routePath)) {
+      return;
+    }
     try {
     try {
-      let Authorization = this.getQueryVariable('Authorization')
+      let Authorization = this.getQueryVariable('Authorization') || null;
       if(window.location.hash.indexOf("+") >= 0) {
       if(window.location.hash.indexOf("+") >= 0) {
         Authorization = Authorization ? Authorization.split('+')[1] : null
         Authorization = Authorization ? Authorization.split('+')[1] : null
         Authorization = ('bearer ' + Authorization)
         Authorization = ('bearer ' + Authorization)
@@ -28,8 +33,8 @@ export default {
         localStorage.setItem("Authorization", Authorization);
         localStorage.setItem("Authorization", Authorization);
         localStorage.setItem("userInfo", Authorization);
         localStorage.setItem("userInfo", Authorization);
       }
       }
-      const auth = localStorage.getItem("Authorization");
-      const userInfo = localStorage.getItem("userInfo");
+      const auth = localStorage.getItem("Authorization") || "";
+      const userInfo = localStorage.getItem("userInfo") || "";
       if (userInfo || auth) {
       if (userInfo || auth) {
         await queryTeacherInfo().then((res) => {
         await queryTeacherInfo().then((res) => {
           const result = res.data || null;
           const result = res.data || null;

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