浏览代码

修改头部请求接口为取缓存

秦鹏 3 年之前
父节点
当前提交
69135b5d69
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/components/Header.vue

+ 5 - 5
src/components/Header.vue

@@ -132,7 +132,7 @@ import { getToken, removeToken } from "@/utils/auth";
 import Cookies from "js-cookie";
 import { getContent, getStaticContent, getLearnWebContent } from "@/api/api";
 import { setI18nLang } from "@/utils/i18n";
-import { getConfigInfor } from "@/utils/index";
+import { getConfig } from "@/utils/auth";
 
 export default {
   name: "LayoutHeader",
@@ -411,9 +411,9 @@ export default {
         this.is_exist = res.is_exist;
       });
     },
-    async _getConfig() {
-      this.configInfor = await getConfigInfor();
-    },
+    // async _getConfig() {
+    //   this.configInfor = await getConfigInfor();
+    // },
   },
   created() {},
   mounted() {
@@ -433,7 +433,7 @@ export default {
         }
       });
     }
-    _this._getConfig();
+    _this.configInfor = JSON.parse(getConfig());
     _this.getLangList();
     _this.getNotReadMessage();
     _this.headTimer = setInterval(() => {