Skip to content

Commit cf9b861

Browse files
committed
Merge branch 'master' of https://github.com/bailicangdu/vue2-elm
2 parents 3cb2aae + 563efd1 commit cf9b861

File tree

3 files changed

+326
-1
lines changed

3 files changed

+326
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ package-lock.json
77
# 忽略使用VSCode开发时,生成的缓存文件夹
88
.vscode
99
tree.md
10+
*.idea

README-en.md

Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,322 @@
1+
# Introduction
2+
3+
[README in Chinese](README.md)
4+
5+
When I began to learn to vue, search of some practical source code about vue, but most of them are simple demo and didn't help to explore the vue. The most of demo are front-end page, such as music player interaction not as complicated as expected.But in actual work, we often meet some project involving money, such as shopping cart page. This kind of project is complex, accompany by login, register ,user information and so on. It's difficult, no one has ever written a project like this in vue and commit to github. So I write it, hope I can hope you.
6+
7+
This functional project is practical but often boring, with no music player so gorgeous. For a long time, I think that Elm APP is a good material. First, it is complex that the open delivery platform is more complicated than the typical project. Second, you won't get bored seeing so much beautiful food.
8+
9+
But why is the Elm APP, not Baidu App or Meituan App? The reason is simple, that Elm's layout is the most beautiful and the most comfortable in the three APP.
10+
11+
There are 45 pages of this project, involving registration, login, merchandise display, shopping cart, order and so on. It is a complete process. The average company project is not that complicated, so if you can understand this project fully, I believe that you can able to do the most of single-page applications in the other company. Even if it's more complex, and it won't be much higher than this one.
12+
13+
The project was done in the spare time, actually it was written years ago and over the years, so the spend time seem a bit long. The project spend more than two months from beginning to end. Now it has been completed, some performance optimizations are being performed to add detailed annotations.
14+
15+
In addition, the project don't related elm video of imooc website, and that project only have one page. After watching the official documentation of vue, I wrote this project directly, and without reference to any code, so please don't mix them up.
16+
17+
__Note: This project is purely personal. If you want to order, please choose the official elm client.__
18+
19+
20+
21+
## Technology
22+
23+
vue2 + vuex + vue-router + webpack + ES6/7 + fetch + sass + flex + svg
24+
25+
26+
## Development
27+
28+
Note:This project used a lot of properties such as ES6/7, so node 6.0.0+ is required.
29+
30+
```
31+
git clone https://github.com/bailicangdu/vue2-elm.git  
32+
33+
cd vue2-elm
34+
35+
npm install
36+
37+
npm run dev
38+
39+
```
40+
41+
42+
## More
43+
This project has the supporting background system. If you want to develop it, you can download the corresponding backend system.[backend system](https://github.com/bailicangdu/node-elm)
44+
45+
Backend system's run command:npm run local .
46+
47+
If you only do the front-end development, ignore this note.
48+
49+
50+
# Explain
51+
52+
> If it helps you, you can click "Star" in the upper right corner to support,thank you. ^_^
53+
54+
> May be you can "follow" me, I will make more interstng projects.
55+
56+
> Development environment: macOS 10.12.3 Chrome 56  nodejs 6.10.0
57+
58+
> Thanks for 辰妹子[@bailichen](https://github.com/bailichen),to help complete the project,thank you🌹
59+
60+
> If you hava some question,you can post the question in Issues, and if you find some solution or some improvement,please pull request. 👍
61+
62+
> The project communication group:528447162(QQ)
63+
64+
> Recommend a open source project about react and redux。[address](https://github.com/bailicangdu/react-pxq)
65+
66+
> Recommend a other demo about vue2 and vuex,it's simple and good for newbie.[address](https://github.com/bailicangdu/vue2-happyfri)
67+
68+
69+
## Dscription of the data interface 🤔
70+
71+
### 2017-05-30
72+
73+
For some reason,previous interfaces could not be used, it made the project failed to run.The new backend system is built by nodejs.[backend system address](https://github.com/bailicangdu/node-elm)接口,数据接口的格式保持了和官网的一致。并提供对应的[后台管理系统](https://github.com/bailicangdu/vue2-manage)
74+
75+
76+
# Demo
77+
78+
[click it](http://elm.cangdu.org/)(Preview with chroe phone mode please)
79+
80+
### The mobile can scan the qr code in the below
81+
82+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/ewm.png" width="250" height="250"/>
83+
84+
85+
86+
# Features
87+
- [x] location function -- finished
88+
- [x] choose city -- finished
89+
- [x] search address-- finished
90+
- [x] display a list of merchant that near by the selected address -- finished
91+
- [x] find food or restaurant -- finished
92+
- [x] sorting and filter according to distance,sales,rating,special course,distribution and so on -- finished
93+
- [x] food list of restaurant -- finished
94+
- [x] cart function -- finished
95+
- [x] evaluation page of shop -- finished
96+
- [x] detail page about one food-- finished
97+
- [x] detail page about merchant -- finished
98+
- [x] login、register -- finished
99+
- [x] change password -- finished
100+
- [x] user center -- finished
101+
- [x] send message、voice verification -- finished
102+
- [x] order function -- finished ✨✨🎉🎉
103+
- [x] order list -- finished
104+
- [x] order detail -- finished
105+
- [x] download App -- finished
106+
- [x] add、delete、change delivery address -- finished
107+
- [x] account info -- finished
108+
- [x] service center -- finished
109+
- [x] red packet -- finished
110+
- [x] upload avator -- finished
111+
- [ ] pay -- No money~~
112+
113+
114+
115+
# Summarize
116+
117+
1, It is not the official of elm, so it is necessary to open the agent, and must be opened on the PC. At most, you can order but not more, after the success of the order, you can check and pay the payment on your mobile phone.
118+
119+
2, In general, the page involves money that is complicated, especially like elm? An open platform, It has many types of merchants and foods, need some complex interaction between page and page. When I writing the cart and order pages, without API but it has a lot of
120+
121+
3, Vue is so bright, because of it's a lightweight framework good at the small and medium-sized project. Whem you want make a large single-page application, you can use vuex, the performance is still outstanding. In the treatment of the complex interaction logic page, vuex is necessary. So if you use vue and vuex, you can make large single-page projects.
122+
123+
4, Now, after make process of the login to register, homepage, search, businesses, shopping cart, order, order list, personal center and so on. I not only understanding the vue to a deeper level, and it's can help for me to control the large project in the future. Do a practical project has great improvement in myself.
124+
125+
5, Sometimes I doubt that to spend a few months make this project has meaning or not. At first I just wanted to do a small project, but I didn't think I could write more, but when I finished I believed it was worth it.
126+
127+
6, The project was already finished, and have 45 pages.
128+
129+
130+
# Ultimate Goal
131+
132+
1, Build a background system to simulate the delivery platform with node.js。[address](https://github.com/bailicangdu/node-elm)
133+
134+
2, Use react-native to write native APP of Android and IOS。[地址在这里](https://github.com/bailicangdu/React-Native-elm)
135+
136+
3、May be I will make a seller's version in the future.
137+
138+
So my goal is to build a full ecosystem across the frontend , backend, IOS and Android.
139+
140+
...Waiting for me
141+
142+
143+
144+
# Screenshot
145+
146+
147+
### store list page
148+
149+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/msite.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/msite.gif" width="365" height="619"/>
150+
151+
152+
### store filter page
153+
154+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/food.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/food.gif" width="365" height="619"/>
155+
156+
157+
158+
### food list and cart
159+
160+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/shop_cart.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/shop_cart.gif" width="365" height="619"/>
161+
162+
### oder check page
163+
164+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/confirm1.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/confirmOrder.gif" width="365" height="619"/>
165+
166+
167+
### search page
168+
169+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/search.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/search.gif" width="365" height="619"/>
170+
171+
172+
### login page
173+
174+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/login1.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/login.gif" width="365" height="619"/>
175+
176+
177+
### user center
178+
179+
<img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/profile.png" width="365" height="619"/> <img src="https://github.com/bailicangdu/vue2-elm/blob/master/screenshots/profile.gif" width="365" height="619"/>
180+
181+
182+
183+
184+
185+
186+
# Layout
187+
188+
```
189+
.
190+
├── build // webpack config file
191+
├── config // package path
192+
├── elm // online project file,can access if put them one the server
193+
├── screenshots // screenshot
194+
├── src // source directory
195+
│   ├── components // components
196+
│   │   ├── common // common components
197+
│   │   │   ├── alertTip.vue // popup components
198+
│   │   │   ├── buyCart.vue // cart components
199+
│   │   │   ├── computeTime.vue // countdown components
200+
│   │   │   ├── loading.vue // the animation component when page is initialized
201+
│   │   │   ├── mixin.js // mixinf components(inculde:directive-loading more,make picture address)
202+
│   │   │   ├── ratingStar.vue // the five rating star component about comment
203+
│   │   │   └── shoplist.vue // the resturant list common component of msite and shop page
204+
│   │   ├── footer
205+
│   │   │   └── footGuide.vue // footer common component
206+
│   │   └── header
207+
│   │   └── head.vue // header common component
208+
│   ├── config // basic configuration
209+
│   │   ├── env.js // environment switch configuration
210+
│   │   ├── fetch.js // git data
211+
│   │   ├── mUtils.js // common function about js
212+
│   │   └── rem.js // px transform rem
213+
│   ├── images // public picture
214+
│   ├── page
215+
│   │   ├── balance
216+
│   │   │   ├── balance.vue // balance page
217+
│   │   │   └── children
218+
│   │   │   └── detail.vue // balance detail page
219+
│   │   ├── benefit
220+
│   │   │   ├── benefit.vue // benefit pahe
221+
│   │   │   └── children
222+
│   │   │   ├── commend.vue // recommend prize
223+
│   │   │   ├── coupon.vue // coupon introduction
224+
│   │   │   ├── exchange.vue // exchange benefit
225+
│   │   │   ├── hbDescription.vue // benefit descripting
226+
│   │   │   └── hbHistory.vue // benefit's history
227+
│   │   ├── city
228+
│   │   │   └── city.vue // local city page
229+
│   │   ├── confirmOrder
230+
│   │   │   ├── children
231+
│   │   │   │   ├── children
232+
│   │   │   │   │   ├── addAddress.vue // add address page
233+
│   │   │   │   │   └── children
234+
│   │   │   │   │   └── searchAddress.vue // search address page
235+
│   │   │   │   ├── chooseAddress.vue // choose address page
236+
│   │   │   │   ├── invoice.vue // choose invoice page
237+
│   │   │   │   ├── payment.vue // pay page
238+
│   │   │   │   ├── remark.vue // order remark page
239+
│   │   │   │   └── userValidation.vue // user validation page
240+
│   │   │   └── confirmOrder.vue // confirm order page
241+
│   │   ├── download
242+
│   │   │   └── download.vue // downlad App
243+
│   │   ├── find
244+
│   │   │   └── find.vue // find page
245+
│   │   ├── food
246+
│   │   │   └── food.vue // food filter sort page
247+
│   │   ├── forget
248+
│   │   │   └── forget.vue // forget password, change password
249+
│   │   ├── home
250+
│   │   │   └── home.vue // index page
251+
│   │   ├── login
252+
│   │   │   └── login.vue // login and register page
253+
│   │   ├── msite
254+
│   │   │   └── msite.vue // merchant list page
255+
│   │   ├── order
256+
│   │   │   ├── children
257+
│   │   │   │   └── orderDetail.vue // order detail page
258+
│   │   │   └── order.vue // order list page
259+
│   │   ├── points
260+
│   │   │   ├── children
261+
│   │   │   │   └── detail.vue // points detail page
262+
│   │   │   └── points.vue // points page
263+
│   │   ├── profile
264+
│   │   │   ├── children
265+
│   │   │   │   ├── children
266+
│   │   │   │   │   ├── address.vue // address page
267+
│   │   │   │   │   └── children
268+
│   │   │   │   │   ├── add.vue // add address page
269+
│   │   │   │   │   └── children
270+
│   │   │   │   │   └── addDetail.vue // search address page
271+
│   │   │   │   ├── info.vue // account info page
272+
│   │   │   │   └── setusername.vue // reset user page
273+
│   │   │   └── profile.vue // user profile page
274+
│   │   ├── search
275+
│   │   │   └── search.vue // search page
276+
│   │   ├── service
277+
│   │   │   ├── children
278+
│   │   │   │   └── questionDetail.vue // question detail page
279+
│   │   │   └── service.vue // service center page
280+
│   │   ├── shop
281+
│   │   │   ├── children
282+
│   │   │   │   ├── children
283+
│   │   │   │   │   └── shopSafe.vue // shop check info page
284+
│   │   │   │   ├── foodDetail.vue // food detail page
285+
│   │   │   │   └── shopDetail.vue // shop detail page
286+
│   │   │   └── shop.vue // shop filter page
287+
│   │   └── vipcard
288+
│   │   ├── children
289+
│   │   │   ├── invoiceRecord.vue // invoice record page
290+
│   │   │   ├── useCart.vue // use card page
291+
│   │   │   └── vipDescription.vue // vip deacription page
292+
│   │   └── vipcard.vue // vip handling page
293+
│   ├── plugins // plugins
294+
│   ├── router
295+
│   │   └── router.js // router configuration
296+
│   ├── service // data interaction and unified deployment
297+
│   │   ├── getData.js // the unified deployment file for get data, and unified management of interfaces
298+
│   │   └── tempdata // temporary data for the development
299+
│   ├── store // Vuex status management
300+
│   │   ├── action.js // actions configuration
301+
│   │   ├── getters.js // getters configuration
302+
│   │   ├── index.js // use vuex,new store
303+
│   │   ├── modules // store modules
304+
│   │   ├── mutation-types.js // make const for muations
305+
│   │   └── mutations.js // mutations configuration
306+
│   └── style
307+
│   ├── common.scss // common css
308+
│   ├── mixin.scss // cs configuration file
309+
│   └── swiper.min.css
310+
│   ├── App.vue // entry page js file
311+
│   ├── main.js // the main js for loading components
312+
├── favicon.ico // icon
313+
├── index.html // entry page html file
314+
.
315+
316+
56 directories, 203 files
317+
```
318+
319+
320+
# License
321+
322+
[GPL](https://github.com/bailicangdu/vue2-elm/blob/master/COPYING)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 前言
22

3+
[README in English](README-en.md)
4+
35
初学vue时曾在网上搜索vue的实战项目源码,无奈大部分都是简单的demo,对于深究vue没有太大的帮助,剩下的一些大部分都是像音乐播放器之类的展示型项目,交互没有预期那么复杂。但我们实际在工作中,经常会遇到有购物车的项目,这类项目因为涉及到money,所以对逻辑严谨度要求高,页面之间交互复杂,又会伴随着登录、注册、用户信息等等,常常会让我们很头疼。既然还没人用vue写过这样的项目,那不如我来写,开源出来对能看到的人也会有帮助。
46

57
这种功能性的项目很实用但是往往也很枯燥,没有音乐播放器那么看起来绚丽,思来想去发现饿了么是一个不错的素材,一来它足够复杂,开放的外卖平台比一般的公司独有商店更加复杂。二来 见到那么多美食,大家也不会感觉到厌烦。
@@ -260,7 +262,7 @@ npm run dev
260262
│   │   ├── profile
261263
│   │   │   ├── children
262264
│   │   │   │   ├── children
263-
│   │   │   │   │   ├── address.vue // 添加地址
265+
│   │   │   │   │   ├── address.vue // 地址
264266
│   │   │   │   │   └── children
265267
│   │   │   │   │   ├── add.vue // 新增地址
266268
│   │   │   │   │   └── children

0 commit comments

Comments
 (0)