export default ({ route, store, params }) => { if (typeof window !== 'undefined') { let host = window.location.host if (true || host === 'bbs.hoolihome.com') { if ( /Android|iPhone|Windows Phone|BlackBerry|iPod|Kindle/i.test( window.navigator.userAgent ) ) { if (route.fullPath.indexOf('/article/') !== -1) { if (host === 'bbs.hoolihome.com') { window.location.replace( `//m.hoolihome.com/${store.state.locale}/article/${ params.articleId }` ) } else { window.location.replace( `//testm.hoolihome.com/${store.state.locale}/article/${ params.articleId }` ) } } else { let redirectUrl = `//m.hoolihome.com${route.fullPath}` window.location.replace(redirectUrl) } } } } }