Vue-router return question

pages An and B, they can both jump to page C, C can jump to page D

A, B-> C-> D

now I am jumping back and forth between C and D, how to solve their order problem?
also, how to determine whether it is entered from An or B.


use the hook of the route to judge beforeEach


write the beforeRouterEnter hook in C, and judge from to know whether it is An or B

.
Menu