通過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{
...
}