Reading the session or cookie to determine the login can be placed in the run method of the corresponding module, so that you will not see the page jump after loading part of it
To completely prevent the content from being visible, you need to let the backend do it. When entering the page, go to the verification logic of the backend first. If you are logged in after the backend verification, then enter the page directly, otherwise go to the login page. .
The front-end cannot limit the URL entered by the user, and static resources must be loaded before they can be judged. . .
Reading the session or cookie to determine the login can be placed in the run method of the corresponding module, so that you will not see the page jump after loading part of it
To completely prevent the content from being visible, you need to let the backend do it. When entering the page, go to the verification logic of the backend first. If you are logged in after the backend verification, then enter the page directly, otherwise go to the login page. .
The front-end cannot limit the URL entered by the user, and static resources must be loaded before they can be judged. . .