判断手机还是pc
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
window.location.href = "https://www.baidu.com/";
} else {
//pc
window.location.href = "http://news.baidu.com/";
}
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
window.location.href = "https://www.baidu.com/";
} else {
//pc
window.location.href = "http://news.baidu.com/";
}