Przeglądaj źródła

fix: 获取本地缓存tqcHasScreen判空

zhenji 1 rok temu
rodzic
commit
81a1c90033
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/utils/util.js

+ 1 - 1
src/utils/util.js

@@ -1000,7 +1000,7 @@ export function getThousandNum(num, need100) {
1000
 export function deleteCacheAndChangeUrl(next = 'left', callback, needName) {//needName 获取名称
1000
 export function deleteCacheAndChangeUrl(next = 'left', callback, needName) {//needName 获取名称
1001
   const screenName = ["/home/operation", "/home/gvc", "/home/tlk"];
1001
   const screenName = ["/home/operation", "/home/gvc", "/home/tlk"];
1002
   const names = ["运营数据中心", "产供销价值链", "TLK运营数据中心 / TLK Plant Dashboard"];
1002
   const names = ["运营数据中心", "产供销价值链", "TLK运营数据中心 / TLK Plant Dashboard"];
1003
-  const HasScreen = localStorage.getItem("tqcHasScreen").split(",") || [];
1003
+  const HasScreen = localStorage.getItem("tqcHasScreen")?.split(",") || [];
1004
   const currUrl = window.location.hash.split("#")[1];
1004
   const currUrl = window.location.hash.split("#")[1];
1005
   //检测是否含有当前页面的路径
1005
   //检测是否含有当前页面的路径
1006
   if (!HasScreen.includes(currUrl)) {
1006
   if (!HasScreen.includes(currUrl)) {