Ver código fonte

fix 跳出路径修改为middleware

anxiaoxia 2 anos atrás
pai
commit
2d2232cd20
1 arquivos alterados com 6 adições e 9 exclusões
  1. 6 9
      src/layouts/index.jsx

+ 6 - 9
src/layouts/index.jsx

@@ -108,15 +108,12 @@ export default (props) => {
 
   let setTimer = useRef();
 
-  const logOut = (msg) => {
-    clearTimeout(setTimer.current);
-    setTimer.current = null;
-    setTimer.current = setTimeout(() => {
-      console.log(msg);
-      window.open('http://10.100.28.70/saasweb/middleware', '_top');
-    }, 1000 * 60 * 5);
-  };
-  logOut('----没有点击,退出');
+  clearTimeout(setTimer.current);
+  setTimer.current = null;
+  setTimer.current = setTimeout(() => {
+    console.log('----没有点击,退出');
+    window.open('http://10.100.28.70/saasweb/middleware', '_top');
+  }, 1000 * 60 * 5);
 
   useEffect(() => {
     clearTimeout(setTimer.current);