User login? vue? Life cycle?


I wrote a login page with vue. Now, after successful login, localStorage is used to cache the data after successful login locally, but one function I want to realize is to directly enter the front page of the APP if you have already logged in. if you have not logged in to the APP, it is the login page. after login, you can enter the personal center and click the bottom navigation switch page back and forth. Ask the great god for advice on how to write it

This requires a navigation guard to judge, portal …