# 微同商城 **Repository Path**: fuyang_lipengjun/platform ## Basic Information - **Project Name**: 微同商城 - **Description**: 减少重复造轮子,开源微信小程序商城(前后端开源:uniapp+Java)。快速搭建一个属于自己的微信小程序商城。QQ交流群:66502035、870579539、151602347、476734088、690637772欢迎大家进群交流技术。体验地址:http://openwtai.com/platform - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: http://openwtai.com - **GVP Project**: Yes ## Statistics - **Stars**: 27704 - **Forks**: 7460 - **Created**: 2017-10-02 - **Last Updated**: 2026-05-25 ## Categories & Tags **Categories**: ecommerce **Tags**: 小程序, 商城 ## README

star fork PRs Welcome

技术站要求: - SpringBoot、MybatisPlus - Vue2、ElementUI ## 前后端全部开源微信小程序商城(Java + uniapp) ### 重要链接 - 新手必看视频教程:[https://doc.openwtai.com/zh-CN/start/videos.html](https://doc.openwtai.com/zh-CN/start/videos.html) - 官网:[https://openwtai.com](https://openwtai.com) - 开发文档:[http://doc.openwtai.com](http://doc.openwtai.com) - 在线体验:[https://doc.openwtai.com/zh-CN/start/view.html](https://doc.openwtai.com/zh-CN/start/view.html) - Gitee仓库:[https://gitee.com/fuyang_lipengjun/platform](https://gitee.com/fuyang_lipengjun/platform) - Github仓库:[https://github.com/lipengjun92/platform-wxshop](https://github.com/lipengjun92/platform-wxshop) - GitCode仓库:[https://gitcode.com/lipengjun92/platform-wxshop.git](https://gitcode.com/lipengjun92/platform-wxshop.git) ### QQ交流群 微同科技 ①群 微同科技 ②群 微同科技 ③群 微同科技 ④群 微同科技 ⑤群 ## 系统架构图 ![](./images/system-architecture.png "系统架构图") ## 时序架构图 ![](./images/sequence.png "时序架构图") ## 重要信息 1. 项目合作洽谈,请联系客服微信(使用微信扫码添加好友,请注明来意)。 2. 如需购买 [商业版源码](https://openwtai.com/blogs) 请联系客服。
![](./images/wx.png "微信") ## 使用须知 ### ✅允许 - 个人学习使用 - 允许用于学习、毕设等 - 允许进行商业使用,请自觉遵守使用协议,如需要商业使用推荐购买[商业版源码](https://openwtai.com/blogs) - 请遵守 Apache License2.0 协议,再次开源请注明出处 - 推荐Watch、Star项目,获取项目第一时间更新,同时也是对项目最好的支持 - 希望大家多多支持原创作品 ## 项目结构 ~~~ platform |--_sql 初始化数据库脚本 |--platform-admin 后台管理接口服务 |--platform-admin-ui 后台管理页面 |--platform-api 微信小程序商城api接口服务 |--platform-biz 业务代码 |--platform-common 公共模块 |--uni-mall uniapp版商城 |--wx-mall 微信小程序原生商城 ~~~ ## 安装教程 * 配置环境(推荐Java21、maven3.8、mysql8.0、redis4.0.1) * 创建数据库 * 依次初始化sql脚本 * /_sql/base.sql * /_sql/mall.sql * /_sql/sys_region.sql * 导入项目到IDE中 * 导入支付证书至/platform-admin/src/main/resources/cert/目录下(申请商户号、开通微信支付、下载支付证书) * 导入支付证书至/platform-api/src/main/resources/cert/目录下 * 修改配置文件 /platform-admin/src/main/resources/application.yml * 修改配置文件 /platform-api/src/main/resources/application.yml * 微信公众号配置 * 微信小程序配置 * 微信支付配置 * 修改配置文件 /platform-admin/src/main/resources/application-dev.yml * 修改配置文件 /platform-api/src/main/resources/application-dev.yml * 数据库配置 * 启动redis服务 * 启动后台项目 * 启动类:PlatformAdminApplication.java * 启动类:PlatformApiApplication.java * 打开微信开发者工具 * 导入 /wx-mall填写appId * 修改 /wx-mall/config/api.js里API_BASE_URL的值 * 使用idea启动项目访问路径 * [http://localhost:8000](http://localhost:8000) ## Docker 一键启动 适用前提: ```bash scripts/build-jars.sh scripts/build-admin-ui.sh ``` 输出到: * `deploy/packages/platform-admin.jar` * `deploy/packages/platform-api.jar` * `deploy/packages/platform-admin-ui-dist/` 首次启动前,如需调整 Maven profile、端口、数据库密码或 JVM 参数,先复制配置文件: ```bash cp deploy/.env.example deploy/.env ``` 其中: * `MAVEN_PROFILE` 控制 `scripts/build-jars.sh` 使用的 Maven profile,默认 `dev` * `NGINX_PORT` 默认 `8888` * `MYSQL_ROOT_PASSWORD` 默认 `root1234` 启动: ```bash scripts/docker-up.sh ``` 停止: ```bash scripts/docker-down.sh ``` 启动后默认访问地址: * 管理台:http://localhost:8888 * 后台接口:http://localhost:8888/platform-framework * 商城接口:http://localhost:8888/platform-framework-api 说明: * `docker-compose.yml` 会一键启动 `mysql`、`redis`、`platform-admin`、`platform-api`、`nginx` * `nginx` 负责托管前端静态资源,并反向代理两个后端服务 * 后端容器运行时启用 `docker` profile,自动加载 `application-docker.yml` * MySQL 首次启动会自动执行仓库 `_sql/` 目录下的初始化脚本;如果 `deploy/data/mysql` 已有数据,则不会重复导入 ## 页面展示 ### 管理端 ![](./images/home.png "首页") ### 品牌供应商 ![](./images/brand.png "品牌供应商") ### 专题管理 ![](./images/topic.png "专题") ### SKU编辑 ![](./images/sku.png "sku") ### 订单 ![](./images/order.png "订单") ### 接口文档 ![](./images/15_06_39.png "接口文档") ### 小程序首页 ![](./images/5.png "小程序首页") ### 专题 ![](./images/6.png "专题") ### 分类 ![](./images/7.png "分类") ### 购物车 ![](./images/8.png "购物车") ### 我的 ![](./images/9.png "我的") ###