What are the routing and permission issues of the vue project page deployed by nuxt?

when users are not logged in, they enter the login page by default, while the login page has a "about us" button. Click to enter the page about us. Click on this.$router.,. Now the problem is to enter the page about us from the login page, refresh and return to the login page. This router problem is still a page permission problem. How to solve it? newcomers enter the vue, to ask for advice

.

refresh is to reopen the page. If your user information is stored in vuex, the refresh will be lost, because the vuex is stored in memory.
so you can put it in sessionStorage, or each time you send a request to the server, the backend returns different results depending on whether there is a user-related cookie (for example, cookie with uuid returns user information, otherwise it returns {redirect:true,url: "your home page"}).

Menu