解决订单列表筛选时间,滑动闪退bug
This commit is contained in:
parent
e258b3a5c8
commit
fc684cbf33
|
@ -63,7 +63,6 @@ let timerstop = null;
|
||||||
export default class App extends Component {
|
export default class App extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
window["mydata"] = this;
|
|
||||||
}
|
}
|
||||||
state = {
|
state = {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -151,9 +150,6 @@ export default class App extends Component {
|
||||||
path: "/home/order-list",
|
path: "/home/order-list",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
lastTime: new Date().getTime(),
|
|
||||||
currentTime: new Date().getTime(),
|
|
||||||
timeOut: 15 * 60 * 1000, //设置超时时间: 1分
|
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount(e) {
|
componentDidMount(e) {
|
||||||
|
@ -227,25 +223,7 @@ export default class App extends Component {
|
||||||
this.getUserInfuFn();
|
this.getUserInfuFn();
|
||||||
this.setState({ pathname: `${pathnamestr}` });
|
this.setState({ pathname: `${pathnamestr}` });
|
||||||
sessionStorage.setItem("showflag", true);
|
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) {
|
componentWillReceiveProps(nextProps) {
|
||||||
//5分钟更新一次商品数据
|
//5分钟更新一次商品数据
|
||||||
let datetime = sessionStorage.getItem("updatetime");
|
let datetime = sessionStorage.getItem("updatetime");
|
||||||
|
|
Loading…
Reference in New Issue