联系官方销售客服
1835022288
028-61286886
下面这段代码 只能屏蔽电脑访客,如何修改 也限制访问手机端呢?
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script>
$.getScript('http://ip.ws.126.net/ipquery', function(){
console.log(localAddress.city)
if(localAddress.city.indexOf('北京') != -1||localAddress.city.indexOf('嘉兴市') != -1||localAddress.city.indexOf('上海') != -1||localAddress.city.indexOf('广州') != -1||localAddress.city.indexOf('深圳') != -1){
_window.location.href = 'http://www.1111.com';
}else{
return;
}
console.log(localAddress.province)
if(localAddress.province.indexOf('') != -1){
_window.location.href = 'http://www.baidu.com';
}else{
return;
}
});
</script>