把以下js代码加到模板里头部
<script type="text/javascript">
if( typeof WeixinJSBridge!== "undefined" ) {}
else
{
if(screen.width>=1000){var opened = window.open('/wxError.html', '_self');}
else{}
}
</script>
然后在后台栏目-自定义页面-新建个自定义页面-命名为wxError.html
代码以下:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,inital-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
<title>抱歉,出错了</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">
</head>
<body>
<div class="weui_msg">
<div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div>
<div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>
</body>
</html>
如有侵权,请联系 hzy98999#qq.com (#改@) 删除。