I wrote a project using vue and ran bulid to generate the dist file. How do I cooperate with the backend? . Previous projects were all about converting html into php files.
1. The separation of vue's front-end and back-end means keeping the file format in dist unchanged without making any changes?
2. The data in the project are all mocked. Obtain data through the interface provided by the backend. What is the interface like?
3. Are there any complete project recommendations? It is all the code placed on the server, using vue as the front end, and there are back-end codes and interface documents
From the question, it seems that you are relatively vague about the front-end. The mode you are talking about is a single-page application
I recommend you to read and study this project,
star 6480
https://github.com/bailicangd...
Technology stack
vue2 + vuex + vue-router + webpack + ES6/7 + fetch + sass + flex + svg
You can learn how to use Vue to develop a single page and interact with the server, and you can understand vuex
Tell me what time.
1. The front-end development of vue generally uses src---webpack---dist. The final deployment on the server is the dist file. Webpack can be simply understood as a compilation process.
2. If you use vue-cli (of course others can also be used, but vue-cli has been integrated for you), there is http-proxy-middleware for interface transfer. If the pure static page is deployed on the server, you need to pass nginx or other server software for transfer.
3. Recruit projects on GitHub, which are generally involved in projects that adjust third-party interfaces.