浏览代码

Merge branch '12/16SAAS' into iterationApp

lex-xin 3 年之前
父节点
当前提交
5b2909a1e4
共有 4 个文件被更改,包括 8 次插入3 次删除
  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

文件差异内容过多而无法显示
+ 0 - 0
dist/app.cc0e2997e5f03b0e757c.js


文件差异内容过多而无法显示
+ 0 - 0
dist/app.de5d32b1b071615207cc.js


文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


+ 8 - 3
src/App.vue

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

部分文件因为文件数量过多而无法显示