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

  

posted on 2019-07-19 21:44  BarneyX  阅读(480)  评论(0编辑  收藏  举报