When vue jumps to a page, how do I get the data sent from the backend?

[problem description]: the individual uses vue+axios+node+mysql for development, uses vue as the front end, and node as the server end to connect to MySQL
[question]: how to obtain the back-end data required for this page when jumping to a route through vue-router?
at present, my personal idea is to query the data on the node side and axios on the vue side.
because when an individual uses html+jquery+node to develop a project before, the page jump is through the get method of node, and you can directly return the data to the interface to use
. Another question you would like to ask is: can you use the previous way of thinking to develop in vue?
I have just entered the pit, and I also ask the great gods to give me some suggestions and ideas.

Mar.20,2021

after the jump route is the new component page, then the new life cycle will be called. At this time, the amount of method call data can be executed in created and mounted. No matter what framework it is, the idea is the same. First look at the document carefully, these are the basis.


vuex know?
ide/ssr.html-sharpSSR-%E5%AE%8C%E5%85%A8%E6%8C%87%E5%8D%97" rel= "nofollow noreferrer" > ssr know?

Menu