解决订单列表筛选时间,滑动闪退bug

This commit is contained in:
Apple 2022-06-09 15:35:14 +08:00
parent e258b3a5c8
commit fc684cbf33
1 changed files with 0 additions and 22 deletions

View File

@ -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");