Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nemo-tree/vue2-shop
基于vue全家桶的移动端 电商商城
https://github.com/nemo-tree/vue2-shop
vue
Last synced: 6 days ago
JSON representation
基于vue全家桶的移动端 电商商城
- Host: GitHub
- URL: https://github.com/nemo-tree/vue2-shop
- Owner: nemo-tree
- Created: 2017-10-02T08:55:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-25T01:24:46.000Z (over 6 years ago)
- Last Synced: 2024-04-09T14:21:53.809Z (7 months ago)
- Topics: vue
- Language: Vue
- Homepage:
- Size: 4.31 MB
- Stars: 738
- Watchers: 32
- Forks: 324
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 技术栈
vue2.0 + vue-router + vuex + axios + mock.js(模拟数据) + ES6 + less
## 简介
vuex + webStorage 实现了购物车功能,axios拦截,配合路由钩子函数实现权限控制、登录、登出功能
## 预览
![](./static/car.gif) ![](./static/login.gif)
## 经验
1. 事先一定要先想好整个页面组成,怎样去分组件开发,这样在开发阶段会事半功倍
2. 本质上vuex只是一个全局变量,所以刷新路由,state数据会清空,可配合webStorage实现响应式
3. 所有webStorage存储应该通过dispatch操作
4. 只做数据渲染,不做数据修改,不需要用vuex
5. 简单的父子通信不需要用vuex
## 待完成
1. 购物车内编辑(增减商品)
2. 搜索功能
## Build Setup
``` bash
# install dependencies
npm install# serve with hot reload at localhost:1322
npm run dev# build for production with minification
npm run build