VUE 修复IOS手机URL问题

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

  

原文地址:https://www.cnblogs.com/flay/p/11215864.html