How does the front end control the display of the page when the front end is separated from the front end?

recently, I am working on a project with ant design pro, and I need to do permission control. I would like to ask you what the process of permission control is, how does the front end control the display and hiding of the page according to permissions, and how do you do it

Mar.16,2021

first of all, permission is relatively safe for the backend to do.
then what the front end does is show and hide the corresponding dom.
for example, when entering a page, call the page permission API to see if the user has no permission to jump or display no permission prompt
, or you can also control the data interface
. The principle is the same by the back end. Return 401 or the corresponding flag to the front end

Menu