userAgent判断是微信还是企业微信
<script>
var ua= window.navigator.userAgent.toLowerCase();
if( (ua.match(/MicroMessenger/i) == 'micromessenger') && (ua.match(/wxwork/i) == 'wxwork') ){
alert("企业微信客户端");
}else if( ua.match(/micromessenger/i) == 'micromessenger' ){
alert("微信客户端");
}
</script>