On the problem of dynamically adding routing (appRoutes) and routing Guard (beforeEach) to vue-router

I now have two entrances to enter the project, but I need to show different pages according to the level of user. After I have successfully obtained the user, I add routes using the addRoutes method of vue-router, but I can"t get the to&&from, in the router.beforeEach method. Is there a way to get it

redirect

the route is not redirected!


you didn't jump. After you get success, you have to jump to the route you want to go

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb49ea-24ee.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb49ea-24ee.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?