Tech Reference — 私域商城

一、技术栈

技术版本说明
管理后台Vue 3 + Element PlusVue 3.xcool-admin 框架
后端Midway.jsMidway 3.xcool-admin 框架
C 端前端uni-appVue 3小程序 + H5 多端
数据库MySQL8.0+主数据存储
缓存Redis7.x会话、积分、库存缓存
文件存储本地/OSS-图片、营业执照
支付微信支付 V3-JSAPI + 小程序支付
消息推送微信订阅消息-订单状态通知

二、项目结构

展开/收起 项目结构
01-私域商城/
├── doc/                          # 需求文档(pm-agent 管理)
│   ├── plan/
│   ├── 通用规范/
│   ├── structurepages/           # 线稿
│   ├── 需求评估文档.md / .html
│   ├── page_structure.md / .html
│   ├── api_list.md / .html
│   ├── database_schema.md / database_er.html
│   ├── business_logic.md / .html
│   └── tech_reference.md / .html
└── code/                         # 代码(开发工程师管理)
    ├── cool-admin-midway/        # 后端(Midway)
    ├── cool-admin-vue/           # 管理后台(Vue 3)
    ├── cool-unix/                # C 端(uni-app)
    ├── README.md
    ├── todos.plan.md
    └── logs/

三、后端模块划分(Midway.js)

模块路径职责
shop-usersrc/modules/shop-user用户、会员、签到
shop-goodssrc/modules/shop-goods商品、分类
shop-ordersrc/modules/shop-order订单、支付
shop-merchantsrc/modules/shop-merchant商户管理
shop-membersrc/modules/shop-member积分、等级
shop-distributionsrc/modules/shop-distribution分销、佣金
shop-marketingsrc/modules/shop-marketing优惠券、活动
shop-deliverysrc/modules/shop-delivery配送对接

四、C 端页面结构(uni-app)

展开/收起 uni-app 目录结构
cool-unix/
├── pages/
│   ├── index/                    # 首页
│   ├── search/                   # 搜索
│   ├── goods/                    # 商品列表/详情
│   ├── cart/                     # 购物车
│   ├── order/                    # 订单相关
│   ├── member/                   # 会员/积分
│   ├── distribution/             # 分销
│   ├── user/                     # 个人中心
│   └── merchant/                 # 商户
├── components/                   # 公共组件
├── store/                        # Pinia 状态管理
├── api/                          # 接口封装
├── utils/                        # 工具函数
└── static/                       # 静态资源

五、关键第三方服务

服务用途优先级
微信小程序 SDK登录、支付、订阅消息P0
微信支付订单支付P0
微信订阅消息订单状态推送P0
第三方配送 API配送下单与追踪P1
短信服务验证码、通知P1
OSS/云存储图片上传P0

六、部署方案

环境说明
开发本地 Docker(MySQL + Redis)
测试云服务器单机部署
生产服务器 + Nginx 反向代理 + MySQL 主从