{"id":20010099,"url":"https://github.com/bxm0927/digital-markets","last_synced_at":"2025-06-26T11:33:20.010Z","repository":{"id":85449263,"uuid":"98599121","full_name":"bxm0927/digital-markets","owner":"bxm0927","description":"这一个基于 Vue.js 的小型电子产品售卖平台，使用了 vue-router、vue-resource 等。","archived":false,"fork":false,"pushed_at":"2017-07-28T02:29:59.000Z","size":1038,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-04T19:40:00.676Z","etag":null,"topics":["css","html","js","vue"],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/bxm0927.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-28T02:26:47.000Z","updated_at":"2025-02-19T09:57:34.000Z","dependencies_parsed_at":"2023-06-25T20:03:08.680Z","dependency_job_id":null,"html_url":"https://github.com/bxm0927/digital-markets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bxm0927/digital-markets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxm0927%2Fdigital-markets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxm0927%2Fdigital-markets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxm0927%2Fdigital-markets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxm0927%2Fdigital-markets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bxm0927","download_url":"https://codeload.github.com/bxm0927/digital-markets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxm0927%2Fdigital-markets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262056398,"owners_count":23251674,"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":["css","html","js","vue"],"created_at":"2024-11-13T07:18:28.244Z","updated_at":"2025-06-26T11:33:20.002Z","avatar_url":"https://github.com/bxm0927.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 电子产品售卖平台\n\n这一个基于 Vue.js 的小型电子产品售卖平台，使用了 vue-router、vue-resource 等。\n\n![图片预览](http://oph264zoo.bkt.clouddn.com/17-7-28/12124023.jpg)\n![图片预览](http://oph264zoo.bkt.clouddn.com/17-7-28/27008677.jpg)\n\n\n## 技术栈\n\n【前端】\n\n- ES6：ECMAScript 新一代语法，这也是以后的趋势\n- Vue.js：界面框架\n- vue-router：配合 Vue 进行路由管理\n- vue-resource：配合 Vue 进行 HTTP 请求处理\n\n【后端】\n\n- Express：模拟后端服务器\n- json-server：一个测试服务器，用来模拟后端数据\n\n【自动化构建】\n\n- webpack：vue-cli 自带的前端自动化编译工具\n\n## 实现细节\n\n**根组件**\n\n根组件 `app.vue` 中实现了顶部和尾部的全局样式，主要包括弹窗组件组件和登录注册组件，用到了简单的正则验证。\n\n**首页**\n\n首页左侧为两个导航，主要使用了 `\u003ctemplate\u003e` 模版、`v-for` 列表渲染、`v-if` 条件渲染。\n\n“全部产品” 的数据是在 `data` 中模拟的后端数据，“最新消息” 的数据是用 `json-server` 这个测试服务器来模拟的后端数据，但是发现 `POST` 请求失败，所以改用了 `express` 来模拟的后端数据;\n\n首页右侧为一个轮播图组件，为了更好的实践我并没有采用第三方插件。\n\n**详情页**\n\n为详情页分配四个子路由，并实现各自的组件功能，其中包含了众多小组件\n\n\n## 收获\n\n1. 对 vue 的组件、指令、选项、模版渲染、事件绑定、计算属性等有了一定了解\n2. 了解了 vue 组件之间的交互、传值\n3. 熟悉了在 vue 项目中使用第三方插件（组件）\n4. 熟悉了组件化、模块化的开发思维\n5. 熟悉了 vue-router 控制路由和子路由的方式\n6. 再次熟悉项目开发流程：项目分析设计 -\u003e 项目环境搭建 -\u003e 依赖安装 -\u003e 页面架构设计 -\u003e 组件开发 -\u003e 测试联调 -\u003e 发布上线\n\n\n## TODO\n\n1. 纯前端项目，数据是模拟的 json 数据\n2. 没有使用 vuex 来管理数据状态\n3. 不是响应式网站\n\n\n## Build Setup\n\n``` bash\n# clone the repo into your disk.\n$ git clone https://github.com/bxm0927/digital-markets.git\n\n# install dependencies\n$ npm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build for production with minification\nnpm run build\n```\n\n\n## License\n\nThe code is available under the [MIT license](https://opensource.org/licenses/MIT).\n\n\n## Thanks\n@fishenal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxm0927%2Fdigital-markets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbxm0927%2Fdigital-markets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxm0927%2Fdigital-markets/lists"}