V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
duanzs
V2EX  ›  Node.js

如何实现一个前端小的路由跳转工具包(路由器)?

  •  
  •   duanzs · Nov 24, 2020 · 3087 views
    This topic created in 1992 days ago, the information mentioned may be changed or developed.

    背景: 我们有几个单独的前端小系统,只有一个入口,用户登录后调后台接口判断哪种用户类型,然后跳转各个系统。

    需求:

    • 最后打包成 js 文件或 npm 包
    • 支持扩展,现在只有两个系统,以后可能更多
    • 跳转逻辑有改动只改动这个路由器,不改动各个小系统
    3 replies    2020-11-24 12:22:48 +08:00
    dingjs
        1
    dingjs  
       Nov 24, 2020
    登录接口 redirect
    weixiangzhe
        2
    weixiangzhe  
       Nov 24, 2020 via Android
    ningx 重定向就完啦
    phobal
        3
    phobal  
       Nov 24, 2020 via iPhone
    如果想搞可扩展性强一点,可以试试微前端方案
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3008 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:19 · PVG 21:19 · LAX 06:19 · JFK 09:19
    ♥ Do have faith in what you're doing.