function is_weixin() {
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
return true;
// console.log(11);
} else {
$('.all').hide();
return false;
}
}
这个方法用于网页是否在微信内打开,是返回true,反之返回false