12345678910111213141516171819202122232425262728293031 |
- 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)
- }
- }
- }
- }
- }
|