the online solution is
export function getAuthority () {
/ / return localStorage.getItem ("antd-pro-authority") | | [" admin", "user"];
return localStorage.getItem (" antd-pro-authority") | | "guest"; / / modify here as guest.
}
export function setAuthority (authority) {
return localStorage.setItem ("antd-pro-authority", authority);
}
) after trying, it is found that you can"t jump after landing successfully. You can jump only when you have admin.
1. Plan 1, configure routing, set the home page to login page
2. Plan 2, make a judgment on the home page, jump to the login page if you are not logged in
I don"t know if God has any specific code that can provide
for these two schemes.