|
@@ -1,4 +1,4 @@
|
|
-import React, { useState, useEffect } from 'react';
|
|
|
|
|
|
+import React, { useState, useEffect, useRef } from 'react';
|
|
import { useModel, useLocation, useIntl } from 'umi';
|
|
import { useModel, useLocation, useIntl } from 'umi';
|
|
import styles from './index.less';
|
|
import styles from './index.less';
|
|
import { MenuFoldOutlined, SmileOutlined } from '@ant-design/icons';
|
|
import { MenuFoldOutlined, SmileOutlined } from '@ant-design/icons';
|
|
@@ -104,8 +104,28 @@ export default (props) => {
|
|
//debugger;
|
|
//debugger;
|
|
console.log('location', location);
|
|
console.log('location', location);
|
|
}, [location]);
|
|
}, [location]);
|
|
|
|
+
|
|
|
|
+ let setTimer = useRef();
|
|
|
|
+ clearTimeout(setTimer.current);
|
|
|
|
+ setTimer.current = null;
|
|
|
|
+ setTimer.current = setTimeout(() => {
|
|
|
|
+ window.open('http://10.100.28.70', '_self');
|
|
|
|
+ }, 1000 * 60 * 30);
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ clearTimeout(setTimer.current);
|
|
|
|
+ setTimer.current = null;
|
|
|
|
+ }, []);
|
|
return (
|
|
return (
|
|
- <div className={styles.layout}>
|
|
|
|
|
|
+ <div
|
|
|
|
+ className={styles.layout}
|
|
|
|
+ onClick={(event) => {
|
|
|
|
+ clearTimeout(setTimer.current);
|
|
|
|
+ setTimer.current = null;
|
|
|
|
+ setTimer.current = setTimeout(() => {
|
|
|
|
+ window.open('http://10.100.28.70', '_self');
|
|
|
|
+ }, 1000 * 60 * 30);
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
<div className={styles.header}>
|
|
<div className={styles.header}>
|
|
<div className={styles.title}>之江项目</div>
|
|
<div className={styles.title}>之江项目</div>
|
|
<div className={styles.right}>
|
|
<div className={styles.right}>
|