소스 검색

fix 清除70服务器缓存

anxiaoxia 2 년 전
부모
커밋
bf89bb2abc
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/layouts/index.jsx

+ 4 - 0
src/layouts/index.jsx

@@ -110,6 +110,8 @@ export default (props) => {
   setTimer.current = null;
   setTimer.current = setTimeout(() => {
     console.log('----没有点击,退出');
+    window.parent.sessionStorage.clear();
+    window.parent.localStorage.clear();
     window.open('http://10.100.28.70/saasweb/login', '_top');
   }, 1000 * 60 * 30);
   useEffect(() => {
@@ -124,6 +126,8 @@ export default (props) => {
         setTimer.current = null;
         setTimer.current = setTimeout(() => {
           console.log('----点击,退出');
+          window.parent.sessionStorage.clear();
+          window.parent.localStorage.clear();
           window.open('http://10.100.28.70/saasweb/login', '_top');
         }, 1000 * 60 * 30);
       }}