var useragent = navigator.userAgent;
if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
// 这里警告框会阻塞当前页面继续加载
// 以下代码是用javascript强行关闭当前页面
// alert("已禁止本次访问:您必须使用微信内置浏览器访问本页面!");
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=888"
}
设置H5页面只可微信浏览器打开
最新推荐文章于 2024-05-16 04:38:34 发布