if (/Android|webOS| iPhone | iPad | iPod |BlackBerry|opera mini|opera mobile|appleWebkit.*mobile|mobile/i.test(navigator.userAgent)) { let locurl = window.location,gourl = '' if (locurl.host) { if(locurl.pathname != '/' && locurl.pathname != '/login' && locurl.pathname != '/register'){ gourl = locurl.origin+'/wap/pages/home' + locurl.pathname }else{ gourl = locurl.origin+'/wap' } window.location.href="hpvsm" + locurl.search } }