After ant design pro starts, it defaults to the page after login. Ask how to set it to be the landing page. There is a problem with the jump after changing the permission of guest.

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.
Apr.10,2021

1. Scheme 1 deletes the default authorized admin
2. Scenario 2 makes a judgment in the effects on the home page, and then uses window.location.href

Menu