$(function(){
//判断是否是手机
var mobile_flag = isMobile();
if(mobile_flag){
$('.now_qq').attr('href',"mqqwpa://im/chat?chat_type=wpa&uin=<?php echo $qq['qq']?>&version=1&src_type=web&web_src=lvlingseeds.com");
}else{
$('.now_qq').attr('href',"tencent://message/?Site=baidu.com&uin=<?php echo $qq['qq']?>&Menu=yes");
}
}) function isMobile() {
var userAgentInfo = navigator.userAgent; var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"]; var mobile_flag = false; //根据userAgent判断是否是手机
for (var v = 0; v < mobileAgents.length; v++) {
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
mobile_flag = true;
break;
}
}
var screen_width = window.screen.width;
var screen_height = window.screen.height; //根据屏幕分辨率判断是否是手机
if(screen_width < 500 && screen_height < 800){
mobile_flag = true;
} return mobile_flag;
}