通过user-agent判断用户是用QQ、微信还是支付宝打开链接或二维码
function is_weixn_qq(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
return "weixin";
} else if (ua.match(/QQ/i) == "qq") {
return "QQ";
}else if(ua.match(/AlipayClient/i) == 'alipayclient'){
return "Alipay";
}else{
...
}