如果关闭手机版的网页显示,目前只想显示PC版,怎么设置?

1339次浏览 更新日期:2020-05-04 16:28:58 分类:问题求助 评论:2

如果关闭手机版的网页显示,目前只想显示PC版,怎么设置?


当前主要针对PC版先上线,暂时没有时间修改手机版。每次手机浏览,自动跳转到手机版,我想先关闭手机版的显示,麻烦各位指教,谢谢!

我来说两句
  • 模板文件index.html里 删除以下代码:
    <meta http-equiv="mobile-agent" content="format=xhtml;url={$site[site_url]}index.php?m=mobile">
          <script type="text/javascript">
          	if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{$site[site_url]}index.php?m=mobile";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}
          </script>
    1
    回复
  • iter
    iter 3年前
    可以了,谢谢!
    0
    回复
作者信息
发布见解
发内容 回顶部