迅睿xunruicms电脑端跳转到手机端“自动识别手机端并强制跳转”,无效的解决方法
迅睿xunruicms电脑端跳转到手机端“自动识别手机端并强制跳转”,无效的解决方法
迅睿函数大全迅睿基础设置迅睿二次开发迅睿模版制作迅睿缓存在线生成迅睿CMS标签大全
迅睿xunruicms开启静态页面功能自动识别判断并跳转到移动端界面供会失效,所以这个时候需要在pc模版里添加跳转代码。
<script type="application/javascript">
$(function(){
if (dr_is_mobile()) {
// 移动端链接地址
document.location.href = '{str_replace(SITE_URL, SITE_MURL, $my_web_url)}';
}
});
</script><script type="application/javascript">
try {
var urlhash = window.location.hash;
if (!urlhash.match("fromapp"))
{
if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)))
{
window.location="{str_replace(SITE_URL, SITE_MURL, $my_web_url)}"; //这里的网址请改为你手机站的网址
}
}
}
catch(err)
{
}
</script> 本文属原创,转载请注明原文:https://www.zhimatong.com/jiaocheng/701.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。
内容有用



交流群
购物车