瀏覽代碼

fix 跳出路径修改为middleware

anxiaoxia 2 年之前
父節點
當前提交
2d2232cd20
共有 1 個文件被更改,包括 6 次插入9 次删除
  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);