{"id":19978001,"url":"https://github.com/tuture-dev/vue-online-shop-frontend","last_synced_at":"2025-08-20T04:32:00.325Z","repository":{"id":44120953,"uuid":"215965302","full_name":"tuture-dev/vue-online-shop-frontend","owner":"tuture-dev","description":"《从零到部署：用 Vue 和 Express 实现迷你全栈电商应用》全栈代码","archived":false,"fork":false,"pushed_at":"2022-02-12T03:51:03.000Z","size":4941,"stargazers_count":191,"open_issues_count":6,"forks_count":52,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-06T00:31:27.558Z","etag":null,"topics":["full-stack","vue","vue-router","vuejs","vuex"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuture-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-18T07:24:23.000Z","updated_at":"2024-12-01T16:11:51.000Z","dependencies_parsed_at":"2022-08-31T01:02:08.925Z","dependency_job_id":null,"html_url":"https://github.com/tuture-dev/vue-online-shop-frontend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fvue-online-shop-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fvue-online-shop-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fvue-online-shop-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fvue-online-shop-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuture-dev","download_url":"https://codeload.github.com/tuture-dev/vue-online-shop-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394228,"owners_count":18218707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["full-stack","vue","vue-router","vuejs","vuex"],"created_at":"2024-11-13T03:30:01.655Z","updated_at":"2024-12-19T07:06:15.644Z","avatar_url":"https://github.com/tuture-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用\n\n【已完成】这里是《从零到部署：用 Vue 和 Express 实现迷你全栈电商应用》系列教程的源代码仓库。\n\n\u003ca name=\"F4RB6\"\u003e\u003c/a\u003e\n## 项目预览\n\n![Lark20200323-131207.gif](https://tva1.sinaimg.cn/large/00831rSTgy1gd54z2ym70g30jg0abazr.gif)\n\n\u003ca name=\"t5Wg4\"\u003e\u003c/a\u003e\n## 项目界面说明\n\n\u003ca name=\"ZKItf\"\u003e\u003c/a\u003e\n### 首页\n\n主要有首页头部导航栏以及展示本地商品信息的列表，列表主要展示了本地商品的名称、介绍、价格、生产商以及添加购物车操作。\n\n![](https://tva1.sinaimg.cn/large/00831rSTgy1gd5502geyij311y0i974t.jpg)\n\n\n\n\u003ca name=\"i3VOg\"\u003e\u003c/a\u003e\n### 后台管理页面\n\n主要用于对商品以及生产商的后台管理，包括查看商品（可以进行修改商品信息）、添加商品、查看生产商（可以进行修改生产商信息）以及添加生产商。\n\n\u003ca name=\"BzD1F\"\u003e\u003c/a\u003e\n#### 查看商品页面\n\n主要展示了后台商品的名称、价格、制造商以及修改和删除操作。\n\n![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zzphloj311y0i9wes.jpg)\n\n\n\n\u003ca name=\"mh4op\"\u003e\u003c/a\u003e\n#### 添加/修改商品页面\n\n展示一个表单页面，主要用于添加一个新商品或者对指定商品信息进行修改。\n\n![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zytgmqj311y0hhglk.jpg)\n\n\u003ca name=\"Dz97A\"\u003e\u003c/a\u003e\n#### 查看制造商页面\n\n主要展示了后台制造商的名称以及修改和删除操作。\n\n![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zwl8yej311t0h2wel.jpg)\n\n\u003ca name=\"A9Daz\"\u003e\u003c/a\u003e\n#### 添加/修改制造商页面\n\n展示一个表单页面，主要用于添加一个新制造商或者对指定制造商信息进行修改。\u003cbr /\u003e![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zv65x4j311t0h10sp.jpg)\n\n\u003ca name=\"9vO3e\"\u003e\u003c/a\u003e\n#### 购物车页面\n\n主要用于展示添加到本地购物车的商品信息列表，列表主要展示了购物车商品的名称、介绍、价格、生产商以及移出购物车操作。\u003cbr /\u003e![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zu7k4uj311u0h1t95.jpg)\n\n\u003ca name=\"Su5Ud\"\u003e\u003c/a\u003e\n## 体验项目\n\n\u003ca name=\"nZocL\"\u003e\u003c/a\u003e\n\n### 克隆仓库，开启前端和后端服务服务：\n\n- 克隆仓库然后进入该仓库：\n```bash\ngit clone https://github.com/tuture-dev/vue-online-shop-frontend.git\ncd vue-online-shop-frontend\n```\n\n### 使用 Docker 一键开启服务\n\n确保安装 Docker，然后执行如下命令：\n\n```bash\ndocker-compose up\n```\n\n### 手动开启服务\n\n#### 数据库\n\n下载安装和启动 MongoDB：[https://www.mongodb.com/](https://www.mongodb.com/)\n\n##### 前端：\n\n在项目目录下：\n\n```bash\ncd client\nnpm install # yarn\nnpm start # yarn start\n```\n\n##### 后端\n\n在项目目录下：\n\n```bash\ncd server\nnpm install # yarn\nnpm start # yarn start\n```\n\n\u003ca name=\"rLy3Q\"\u003e\u003c/a\u003e\n##  教程内容概要\n\n1. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（一）](https://tuture.co/2019/10/17/0b662ce/)\u003cbr /\u003e\n用 Vue 搭建前端项目的骨架，实现基于嵌套、动态路由的多页面跳转。\n\n2. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（二）](https://tuture.co/2019/10/21/cb08dc8/)\u003cbr /\u003e\n我们通过基于 Node.js 平台的 Express 框架实现了后端 API 数据接口，并且将数据存储在 MongoDB 中。这样我们的网站就能够记录用户添加的商品，并且无论以后什么时候打开，都能获取我们之前的记录。\n\n3. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（三）](https://tuture.co/2019/12/18/5e10a46/)\u003cbr /\u003e\n我们讲解了 Vue 实例的 Props 和 Methods，接着我们又讲解了最常见的 Vue 模板语法，并通过实例的方式将这些模板语法都实践了一番，最后我们讲解了 Vue 组件的组合，并完成了我们的发表商品页面。\n\n4. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（四）](https://tuture.co/2020/01/10/ae8a389/)\u003cbr /\u003e\n我们使用了状态管理库 Vuex 并带大家熟悉了 Store、Mutation 和 Action 三大关键概念，然后升级了迷你商城应用的前端代码。\n\n5. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（五）](https://tuture.co/2020/02/11/6f96d15/)\u003cbr /\u003e\n我们带大家抽出了 Vue 组件从而简化页面逻辑，使用 Vuex Getters 复用本地数据获取逻辑。\n\n6. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（六）](https://tuture.co/2020/03/03/-Oixkkq/)\u003cbr /\u003e\n我们带大家一起学习了如何抽出 Getters 、 Mutations 和Actions 逻辑实现store的“减重”以及如何干掉 mutation-types 硬编码。\n\n7. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（七）](https://tuture.co/2020/03/13/tc1c9oD/)\u003cbr /\u003e\n我们基于element-ui组件库重构了项目的前端代码，改善迷你电商应用的界面效果，提高用户的体验感；并且从试错的角度带大家一起踩了代码重构造成的一系列坑。\n\n8. [ 从零到部署：用 Vue 和 Express 实现迷你全栈电商应用（八）](https://tuture.co/2020/03/14/-td0ssr/)\u003cbr /\u003e\n我们首先使用 Docker 来容器化应用，接着教大家配置了 MongoDB 的身份验证机制，给数据库添加一份安全守护，最后我们教大家使用阿里云的容器镜像服务将整个全栈应用部署到了云端，使互联网上的用户可以访问我们的网站。\n\u003ca name=\"7tL2O\"\u003e\u003c/a\u003e\n## 反馈\n\n欢迎对此教程的内容进行反馈（无论是疑问还是改进意见），可以在文章下方留言，也可以在此仓库创建 Issue！\n\n\u003ca name=\"62ZxJ\"\u003e\u003c/a\u003e\n### 联系我们\n\n- [微信公众号](https://tuture.co/images/social/wechat.png)：关注公众号，加图雀酱微信拉你进学习交流群\n- [掘金](https://juejin.im/user/5b33414351882574b9694d28)\n- [知乎专栏](https://zhuanlan.zhihu.com/tuture)\n- 知乎圈子：搜索 图雀社区\n- 也可以直接扫码下方的二维码关注微信公众号哦：\u003cbr /\u003e\n![](https://tva1.sinaimg.cn/large/00831rSTgy1gd54zrfl26j30p00dw41z.jpg)\n\n\u003ca name=\"8GU2e\"\u003e\u003c/a\u003e****\n## 许可证\n\nMIT。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuture-dev%2Fvue-online-shop-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuture-dev%2Fvue-online-shop-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuture-dev%2Fvue-online-shop-frontend/lists"}