Vue navigation guard and axios interceptor

I found that beforeEach, the vue navigation guard, can verify login permissions, so is there no need for axios interceptors? I hope the bosses will tell us what you think.
or rather, the axios interceptor is sufficient, and there is no need for vue navigation guards. Bosses, please answer


The interceptor of

axios is used to unify the processing parameters (add token), and process the returned data
beforeEach hook to determine whether to jump the route based on the returned permission data.

< hr >

do you want to.
do you want to determine permissions in the created hook of each component?
add common parameters such as token every time you send a request?

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-1e460c4-43afb.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-1e460c4-43afb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?