;(function() {
let windowNoSystem=function(time){
let userTime = time*60;
console.log(userTime)
let startInit=0;
setInterval(function () {
startInit++;
console.log(startInit)
if(startInit==userTime){
console.log(startInit)
console.log("时间到了,要进行锁屏")
}
},1000)
var objTime={
eventFun:function () {
startInit=0;
}
}
let body = document.querySelector('html');
body.addEventListener("click",objTime.eventFun);
body.addEventListener("keydown",objTime.eventFun);
body.addEventListener("mousemove",objTime.eventFun);
body.addEventListener("mousewheel",objTime.eventFun);
}
//兼容处理
if(typeof module!=='undefined'&&module.exports){
module.exports=windowNoSystem;
}else if(typeof define==='function'){
define(function () {
return windowNoSystem
})
}else {
window.windowNoSystem=windowNoSystem
}
}())