判断是否微信浏览器,是的话,加入自己想加的功能
<script type="text/javascript">
//微信浏览器端隐藏微信支付宝支付
function isWeiXin() {
var ua = window.navigator.userAgent.toLowerCase();
console.log(ua); //mozilla/5.0 (iphone; cpu iphone os 9_1 like mac os x) applewebkit/601.1.46 (khtml, like gecko)version/9.0 mobile/13b143 safari/601.1
if(ua.match(/MicroMessenger/i) == 'micromessenger') {
if(screen.width > 1024) {
$('.wchat_pay').remove();
$('.alipay_pay').remove();
}
return true;
} else {
return false;
}
}
isWeiXin();//调用此方法
</script>
是我吖~