Router.beforeEach(()=>{

if (to.query.IP) {
    next();
    return;
  };
  if (from.query.IP) {
    let toQuery = JSON.parse(JSON.stringify(to.query));

    toQuery.abc = from.query.IP;
    next({
      path: to.path,
      query: toQuery
    })
  } else {
    next()
  }

})
只需要在全局的路由守卫中添加上述代码即可实现

 

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2021-12-02
  • 2021-07-19
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
  • 2021-11-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-09-20
  • 2022-12-23
  • 2023-01-21
相关资源
相似解决方案