{"id":16976878,"url":"https://github.com/hai-27/store-miniprogram","last_synced_at":"2025-03-23T17:31:05.223Z","repository":{"id":108908671,"uuid":"247699265","full_name":"hai-27/store-miniprogram","owner":"hai-27","description":"仿小米商城微信小程序","archived":false,"fork":false,"pushed_at":"2022-04-08T16:53:58.000Z","size":3821,"stargazers_count":39,"open_issues_count":2,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T22:23:45.549Z","etag":null,"topics":["miniprogram","wechat","wechat-mini-program"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hai-27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-03-16T12:41:57.000Z","updated_at":"2024-12-12T14:33:36.000Z","dependencies_parsed_at":"2023-03-17T20:30:43.554Z","dependency_job_id":null,"html_url":"https://github.com/hai-27/store-miniprogram","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/hai-27%2Fstore-miniprogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hai-27%2Fstore-miniprogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hai-27%2Fstore-miniprogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hai-27%2Fstore-miniprogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hai-27","download_url":"https://codeload.github.com/hai-27/store-miniprogram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245140872,"owners_count":20567461,"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":["miniprogram","wechat","wechat-mini-program"],"created_at":"2024-10-14T01:27:28.886Z","updated_at":"2025-03-23T17:31:05.179Z","avatar_url":"https://github.com/hai-27.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 小小米(vue-store 微信小程序版)\n## 前言\n\n前段时间模仿小米商城做了一个PC端的商城网站[vue-store]( https://github.com/hai-27/vue-store )，最近看了下微信小程序的文档，所以就动手做了个微信小程序版的。\n\n## 说明\n\n\u003e 本项目复用了 [vue-store]( https://github.com/hai-27/vue-store ) 的后端，在 [store-server](https://github.com/hai-27/store-server) 原来的基础上添加了微信小程序的登录api。\n\n\u003e 利用网课的空余时间边学边做，略为粗糙，有问题或者有好的建议欢迎提Issues。\n\n\u003e 由于是用测试号做的，没有线上预览版。\n\n\u003e PC端Web版：[vue-store]( https://github.com/hai-27/vue-store )。\n\n\u003e 后端： [store-server](https://github.com/hai-27/store-server) 。\n\n\u003e  如果觉得这个项目还不错，您可以点右上角 `Star`支持一下， 谢谢！ ^_^ \n\n## 项目简介\n\n为区分小米商城官方小程序，该项目我命名为小小米。该项目与小米官方没有关系，纯属个人瞎搞，若需要购买小米产品请到小米官方商城。\n\n项目包含4个tabBar：首页、发现页（即商品展示页）、购物车、我的。另有商品详情页、我的收藏、订单结算页面、我的订单。\n\n实现了商品的展示、商品分类查询、关键字搜索商品、商品详细信息展示、用户购物车、订单结算、用户订单、用户收藏列表。\n\n该项目整体参考了 [vue-store]( https://github.com/hai-27/vue-store ) 实现，基本实现了其所有功能，可以说是其的微信小程序版。\n\n后端复用了 [vue-store]( https://github.com/hai-27/vue-store ) 的后端，在 [store-server](https://github.com/hai-27/store-server) 原来的基础上添加了微信小程序的登录api。\n\n## 技术栈\n\n- **前端：** 原生微信小程序\n\n- **后端：**`Node.js`、`Koa框架`\n\n- **数据库：**`Mysql`\n\n## 功能模块\n\n### 登录\n\n小程序在启动的时候调用 **wx.login** 获取登录凭证（**code**），然后把code回传到项目的后端服务器 ，调用**auth.code2Session**接口，换取用户唯一标识 **OpenID** 和 会话密钥 **session_key**。 然后把 **OpenID** 注册到项目数据库生成本系统的唯一 **user_id** ，用于在本项目的业务验证。\n\n### 首页\n\n首页主要是对商品的展示，有轮播图展示推荐的商品，热门商品分类九宫格、分类别对热门商品进行展示。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/home.png)\n\n### 发现（即全部商品）\n\n全部商品页面集成了全部商品展示、商品分类查询，以及根据关键字搜索商品结果展示。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/goods.png)\n\n### 商品详情页\n\n商品详情页主要是对某个商品的详细信息进行展示，用户可以在这里把喜欢的商品加入购物车或收藏列表。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/detail.png)\n\n### 我的购物车\n\n购物车采用[omix](https://github.com/Tencent/omi)进行全局状态管理，实现了购物车商品的添加、删除、增加商品数量、选择结算商品、全选购物车商品结算等功能。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/shoppingCart.png)\n\n### 订单结算\n\n用户在购物车选择了准备购买的商品后，点击“去结算”按钮，会来到该页面。\n用户在这里选择收货地址，确认订单的相关信息，然后确认购买。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/confirmOrder.png)\n\n### 我的收藏\n\n用户在商品的详情页，可以通过点击加入 喜欢 按钮，把喜欢的商品加入到收藏列表。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/collection.png)\n\n### 我的订单\n\n对用户的所有订单进行展示。\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/orders.png)\n\n### 我的\n\n![](https://raw.githubusercontent.com/hai-27/vue-store/master/public/screenshots/weChatMiniProgramScreenshots/mine.png)\n\n## 运行项目\n\n```\n请clone项目到本地\ngit clone https://github.com/hai-27/store-miniprogram.git\n导入项目到微信开发者工具即可\n```\n\n\n\n**作者** [hai-27](https://github.com/hai-27)\n\n2020年3月31日","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhai-27%2Fstore-miniprogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhai-27%2Fstore-miniprogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhai-27%2Fstore-miniprogram/lists"}