判断是从微信进入还是企业微信进入

<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>
---------------------

原文:https://blog.csdn.net/hrf368246980/article/details/83055671

posted @ 2018-12-17 11:47  方小川  阅读(4322)  评论(0编辑  收藏  举报