<script type="text/javascript"> // 對瀏覽器的UserAgent進行正則匹配,不含有微信獨有標識的則為其他瀏覽器 var useragent = navigator.userAgent; if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') { // 這里警告框會阻塞當前頁面繼續加載 var url = window.location.href; window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid={$_W['account']['key']}&redirect_uri='+url+'&response_type=code&scope=snsapi_base&state=YWN0PW1vZHVsZSZuYW1lPXNob3BwaW5nMiZkbz1saXN0JndlaWQ9Mg==&connect_redirect=1#wechat_redirect'; } </script>
