(function() { try { const params = new URLSearchParams(window.location.search || ''); const force = params.get('client'); const w = Math.min( window.innerWidth || screen.width || 0, screen.width || window.innerWidth || 0 ); const goMobile = force === 'mobile' || (!force && w < 1024); if (goMobile) { const search = window.location.search || ''; const hash = window.location.hash || ''; window.location.replace('/mobile/index.html' + search + hash); return; } } catch (e) { // 忽略重定向错误,继续加载桌面端 } })();