var script=document.createElement("script"); script.type="text/javascript"; script.src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/jquery.min3696b4.js"; document.getElementsByTagName('head')[0].appendChild(script); function isMobile() { const screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; const mobileScreenWidth = 768; // 手机设备的屏幕宽度阈值 return screenWidth < mobileScreenWidth; } if(isMobile()){ }else{ $("body").css("overflow","hidden"); document.write('
'); } //setCookie("scene_id","1762082665",3600*24*365); check_login(); function check_login() { $.ajax({ url:"https://www.wechatjob.com/e/extend/weixin/check_ewm.php", type:'post', //contentType:"json", data:{ scene_id: '1762082665' }, success: function(data){ console.log(data); if(data!=''){ var obj = eval('(' + data + ')'); if(obj.msg=='success'){ $("#div_qrcode_container").css("display","none"); setTimeout("check_login()", 1000); $("body").css("overflow","auto"); }else{ $("#div_qrcode_container").css("display","block"); setTimeout("check_login()", 1000); } }else{ $("#div_qrcode_container").css("display","block"); setTimeout("check_login()", 1000); } } }) } function setCookie(name, value, seconds) { seconds = seconds || 0; //seconds有值就直接赋值,没有为0,这个根php不一样。 var expires = ""; if (seconds != 0 ) { //设置cookie生存时间 var date = new Date(); date.setTime(date.getTime()+(seconds*1000)); expires = "; expires="+date.toGMTString(); } document.cookie = name+"="+escape(value)+expires+"; path=/"; //转码并赋值 }