// 如果5分钟没有操作,退出到登录页 var timer; function startTimer(){ clearTimeout(timer); timer=setTimeout(function(){ // 清空缓存和token $cookies.remove("access_token", { path: "/" }); $cookies.remove("userName", { path: "/" }); $cookies.remove("userId", { path: "/" }); $cookies.remove("roleName", { path: "/" }); $cookies.remove("userCount", { path: "/" }); window.location.href = "/index.html" },5*60*1000); } document.οnmοusemοve=document.οnmοusedοwn=startTimer
如果5分钟没有操作,退出到登录页
最新推荐文章于 2024-07-16 20:50:21 发布