请将此代码添加至全局——嵌入相关——模板加载前嵌入:
<script>
(function() {
if(window.screen.width < 1000 && location.hostname.split('.')[0] != 'm') {
location.href = 'http://m.hadsky.com' + location.pathname + location.search + location.hash;
}
})();
</script>上述代码UC浏览器不跳转,请使用下列代码:
<script>
$(function() {
if($(window).width() < 1000 && location.hostname.split('.')[0] != 'm') {
location.href = 'http://m.hadsky.com' + location.pathname + location.search + location.hash;
}
})
</script>请将上述代码中的http://m.hadsky.com替换为http://m.你的主域名