Build a large single-page application with 45 pages based on vue2 + vuex

#


Preface When I first learned Vue, I searched the source code of Vue's actual project on the Internet, but most of them are simple demos, which are not very helpful for digging into Vue. Most of the rest are display types like music players. Items, interactions are not as complex as expected. However, in our work, we often encounter items with shopping carts. Because such items involve money, they require high logic rigor, complex interactions between pages, and will be accompanied by login, registration, user information, etc. Wait, it often gives us a lot of headaches. Since no one has written such a project with vue, it is better for me to write it, and open source it will also help those who can see it.

This kind of functional project is very practical, but it is often very boring. It does not look as gorgeous as a music player. After thinking about it, I found that Ele.me is a good material. First, it is complex enough, and the open food delivery platform is better than the average one. Company-exclusive stores are more complex. Second, seeing so many delicious food, everyone will not feel bored.

Why are you hungry, not Baidu, Meituan? The reason is very simple. Among the three big takeaways, Ele.me has the most beautiful colors and layouts and looks the most comfortable.

This project has a total of 45 pages, including registration, login, product display, shopping cart, ordering, etc. It is a complete process. Even the single-page project on the official website of a general company is not so complicated. If this project can be managed, I believe that other single-page applications of most companies will not be a problem. Even if it is more complicated, it will not be higher than this. go.

Because I used my spare time to do it, I started writing it a year ago, and it spanned another year. The cycle was a bit long. It took more than 2 months for the project to go from zero layout to completion. At present, the project has been completed, and some performance optimizations are underway. Detailed notes.

In addition, this project has nothing to do with Ele.me in the video of MOOC. The project of MOOC has only one page. I wrote this project directly after reading the official documentation of Vue, without referring to anyone's code, please Don't get mixed up.

__Note: This project is purely personal, please select the official Ele.me client to place an order normally. __


# Source address:

https://github.com/bailicangdu/vue2-elm

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326851225&siteId=291194637