Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Habitica | 9,861 | 2 days ago | 211 | other | JavaScript | |||||
A habit tracker app which treats your goals like a Role Playing Game. | ||||||||||
Blog | 4,197 | 3 months ago | 70 | HTML | ||||||
大前端技术为主,读书笔记、随笔、理财为辅,做个终身学习者。 | ||||||||||
Vue2 Element Touzi Admin | 3,956 | 25 days ago | 21 | Vue | ||||||
基于vue2.0 +vuex+ element-ui后台管理系统 | ||||||||||
Docx | 3,207 | 47 | 77 | 18 hours ago | 64 | September 22, 2022 | 82 | mit | TypeScript | |
Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser. | ||||||||||
Doclever | 2,889 | 6 months ago | 114 | JavaScript | ||||||
做最好的接口管理平台 | ||||||||||
Vue Express Mongo Boilerplate | 2,785 | 1 | 2 years ago | 1 | January 30, 2017 | 84 | JavaScript | |||
:star: MEVN Full stack JS web app boilerplate with NodeJS, Express, Mongo and VueJS | ||||||||||
Docxtemplater | 2,491 | 184 | 77 | 7 days ago | 245 | August 30, 2022 | 7 | other | JavaScript | |
Generate docx, pptx, and xlsx from templates (Word, Powerpoint and Excel documents), from Node.js, the Browser and the command line / Demo: https://www.docxtemplater.com/demo. #docx #office #generator #templating #report #json #generate #generation #template #create #pptx #docx #xlsx #react #vuejs #angularjs #browser #typescript #image #html #table #chart | ||||||||||
Webchat | 1,945 | 18 days ago | 4 | mit | JavaScript | |||||
:speaker: Websocket project based on vue(基于vue2.0的实时聊天项目) | ||||||||||
Prevue | 1,321 | 2 months ago | 10 | Vue | ||||||
🎨 All in One Prototyping Tool For Vue Developers. | ||||||||||
Express Vue | 1,308 | 72 | 4 | 7 months ago | 129 | January 11, 2021 | 47 | other | JavaScript | |
Vue rendering engine for Express.js. Use .Vue files as templates using streams |
基于 Vue 全家桶 (2.x) + Node.js + Express + MongoDB + ES6 制作的购物商城系统 (高仿小米商城),通过实现简易的商城系统来学习当下最热最流行的大前端框架和技术,商城采用前后端分离的开发方式,Vue 全家桶 (2.x)全部涉及
【前端】
Vue
:用于构建用户界面的 MVVM 框架。它的核心是响应的数据绑定和组系统件
vue-router
:为单页面应用提供的路由系统,项目上线前使用了 Lazy Loading Routes
技术来实现异步加载优化性能vuex
:Vue 集中状态管理,在多个组件共享某些状态时非常便捷。项目的登录状态和购物车数量等状态在每个页面都需要使用,因此使用 Vuex 来集中管理,大大降低我们组件开发数据传递的复杂度axios
:服务端通讯。Express 提供 Rest 接口对接前端,前端所有的请求均通过 axios 来实现数据接收和页面渲染vue-lazyload
:第三方图片懒加载库,优化页面加载速度vue-infinite-scroll
:Vue 滚动插件ES6
:ECMAScript 新一代语法,模块化、解构赋值、Promise、Class 等方法非常好用【后端】
Node.js
:整个商城后台通过 Node.js 进行实现,通过 Express 框架实现后端的 REST 接口,并以 json 的形式进行输出【数据库】
mongoDB
:NoSQL 数据库,使用 mongoose (Node.js 的 mongodb 驱动软件包) 进行 mongoDB 快速建模【自动化构建及其他工具】
vue-cli
:Vue 脚手架工具,快速初始化项目代码eslint
:代码风格检查工具,规范代码书写主要页面:首页 (商品模块)、用户模块、地址模块、购物车模块、订单模块、用户注册模块
首页 (商品模块)
左侧是按价格过滤功能,当屏幕尺寸缩小时,会有响应式改变
右侧为商品列表页,商品采用卡片式展示,可以按价格排序,默认显示 8 条数据,启动下拉加载并有 loading 效果,图片采用懒加载优化页面加载速度
商品的数据通过 MongoDB 进行存储,并做了分页和 loading
处理
用户模块
头部是一个导航栏,包括登录和购物车入口,登录初始账号:admin ---- 123456
前端通过 axios 请求后端 Express 路由,后端返回数据
用户模型存储在 MongoDB 中,当用户登入时,在 cookie 中记录,注销时清除 cookie
地址模块
地址的 MongoDB 数据库模型是 USER 模型的一部分,可以设置默认收货地址
默认显示 3 条地址
购物车模块
购物车数量状态通过 Vuex
管理,数量的加减会实时反映到购物车角标
订单模块
通过路由传参::to="{ path: 'orderConfirm', query:{ 'addressId': selectedAddrId } }"
定单号在服务器端生成,采用 “平台码 + 随机数 + 时间戳” 的形式
若前台篡改定单号,后台会做处理
# 通过git 下载项目
$ git clone https://github.com/aaaaaFei/mongoDB.git
# 安装依赖
$ npm install
# 导入 MongoDB 数据
# -d (数据库名字) -c(数据表名字) --file(数据库模板文件目录)
$ mongoimport -d vue_xiaomi -c goods --file E:\resource\dumall-goods
$ mongoimport -d vue_xiaomi -c users --file E:\resource\dumall-users
# 运行 Vue
$ npm run dev
# 运行 Node.js
$ node server/bin/www