How does ant-design-pro get permission information asynchronously from the background?

the initial permissions in ant-design-pro are obtained from Synchronize in localstorage (. / src/utils/authority.js). The permission information obtained is used to determine the jump of the page (whether to jump to the login page). I want to obtain permission information asynchronously from the background. Other procedures remain unchanged. How can I achieve this?

Feb.28,2021

just change the interface directly in service.


may not answer the question, make a backup;
the permissions in the left column are set asynchronously

1. request // 
2.  utils/authority  setAuthoritylocalStorage
3.  utils/Authorized  reloadAuthorized 
Menu