PC端路由代码
/**
* 验证
*/
router.beforeEach((to, from, next) => {
if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
window.location.href = '/p_index.html#/'
return
}
next()
})
移动端代码
/**
* 验证
*/
router.beforeEach((to, from, next) => {
if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
window.location.href = '/p_index.html#/'
return
}
next()
})