在路由里面加入后置钩子
router.afterEach((to, from) => {
const u = navigator.userAgent.toLowerCase()
if(u.indexOf("like mac os x") < 0 || u.match(/MicroMessenger/i) != 'micromessenger' || u.match(/WebP/i) == "webp") return
if (to.path !== global.location.pathname) {
location.assign(to.fullPath)
}
})
网友评论