71

parent 30620084
...@@ -127,24 +127,22 @@ ...@@ -127,24 +127,22 @@
window.addEventListener('orientationchange',()=>{ window.addEventListener('orientationchange',()=>{
let width = document.documentElement.clientWidth let width = document.documentElement.clientWidth
let height = document.documentElement.clientHeight let height = document.documentElement.clientHeight
// console.log(document.documentElement.clientWidth)
// console.log(document.documentElement.clientHeight)
let t = setTimeout(function(){ let t = setTimeout(function(){
if(width<height){ if(width<height){
sessionStorage.setItem('orientationchange', 1); sessionStorage.setItem('orientationchange', 1);
that.orientationchange=true; that.orientationchange=true;
console.log(that.orientationchange) // console.log(that.orientationchange)
clearTimeout(t) clearTimeout(t)
// return // return
}else{ }else{
sessionStorage.setItem('orientationchange', 0); sessionStorage.setItem('orientationchange', 0);
that.orientationchange=false; that.orientationchange=false;
console.log(that.orientationchange) // console.log(that.orientationchange)
clearTimeout(t) clearTimeout(t)
// return // return
} }
},100) },100)
console.log(137) // console.log(137)
// debugger // debugger
},false); },false);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment