From fc684cbf33994953b637f89cfc31afc20d2489b8 Mon Sep 17 00:00:00 2001 From: Apple <> Date: Thu, 9 Jun 2022 15:35:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=AD=9B=E9=80=89=E6=97=B6=E9=97=B4=EF=BC=8C=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E9=97=AA=E9=80=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/home.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/pages/home/home.js b/src/pages/home/home.js index e2edc872..acc70626 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -63,7 +63,6 @@ let timerstop = null; export default class App extends Component { constructor(props) { super(props); - window["mydata"] = this; } state = { visible: false, @@ -151,9 +150,6 @@ export default class App extends Component { path: "/home/order-list", }, ], - lastTime: new Date().getTime(), - currentTime: new Date().getTime(), - timeOut: 15 * 60 * 1000, //设置超时时间: 1分 }; componentDidMount(e) { @@ -227,25 +223,7 @@ export default class App extends Component { this.getUserInfuFn(); this.setState({ pathname: `${pathnamestr}` }); sessionStorage.setItem("showflag", true); - window.document.addEventListener("mouseover", function () { - window["mydata"].setState({ lastTime: new Date().getTime() }); //更新操作时间 - }); - //根据权限菜单进行匹配 - - // timerstop=window.setInterval( window["mydata"].testTime, 1000); } - // testTime(){ - // window["mydata"].setState({'currentTime':new Date().getTime()});//更新当前时间 - // if( window["mydata"].state.currentTime - window["mydata"].state.lastTime > window["mydata"].state.timeOut){ //判断是否超时 - // window.clearInterval(timerstop) - // Notify.clear() - // Notify.warn('登录失效,请重新登录!') - // sessionStorage.clear(); - // setTimeout(()=>{ - // window["mydata"].props.history.push('/login'); - // },5000); - // } - // } componentWillReceiveProps(nextProps) { //5分钟更新一次商品数据 let datetime = sessionStorage.getItem("updatetime");