内容页跳转代码如下:(具体要根据你的路径)建议你下载套官方模板,复制修改跳转代码。
<meta http-equiv="mobile-agent" content="format=xhtmlurl={dede:global.cfg_mobileurl/}{dede:type}[field:typelink/]{/dede:type}{dede:field.id/}.html">
<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="{dede:global.cfg_mobileurl/}{dede:type}[field:typelink/]{/dede:type}{dede:field.id/}.html"}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
打开主页模版index.htm,找到head头部元素里面带有/m/index.php大概是这么长
<meta http-equiv="mobile-agent" content="format=xhtmlurl=/m/index.php">
<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="index.php"}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
删掉它们
模板文件里的移动端模板全部干掉,重新生成
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)