为元宝分享红包从业者(个人、小团队、中介)提供的"手动录入-简易管理-高效分发-基础对账"轻量化工具
本系统聚焦"轻量化、可快速上线",规避复杂的平台API对接,适配个人及3-5人小团队的手动操作场景,解决核心生意痛点。
yb-red-mvp/ ├── yb-red-mvp-backend/ # Spring Boot 后端 │ ├── src/main/java/com/cnb/ybredmvp/ │ │ ├── controller/ # 控制器层 │ │ ├── service/ # 服务层 │ │ ├── mapper/ # 数据访问层 │ │ ├── entity/ # 实体类 │ │ ├── dto/ # 数据传输对象 │ │ ├── config/ # 配置类 │ │ └── util/ # 工具类 │ ├── src/main/resources/ │ │ ├── mapper/ # MyBatis XML 映射 │ │ └── application.yml # 配置文件 │ ├── pom.xml # Maven 配置 │ └── Dockerfile # 后端镜像构建 │ ├── yb-red-mvp-frontend/ # Vue 3 前端 │ ├── src/ │ │ ├── api/ # API 请求 │ │ ├── components/ # 公共组件 │ │ ├── views/ # 页面视图 │ │ ├── router/ # 路由配置 │ │ ├── stores/ # Pinia 状态管理 │ │ └── utils/ # 工具函数 │ ├── package.json # npm 配置 │ ├── vite.config.ts # Vite 配置 │ └── Dockerfile # 前端镜像构建 │ ├── docker-compose.yml # 本地开发环境 ├── schema.sql # 数据库初始化脚本 └── README.md # 项目文档
git clone https://github.com/your-org/yb-red-mvp.git
cd yb-red-mvp
mysql -h 192.168.5.66 -uroot -prootpassword < schema.sql
cd yb-red-mvp-backend
mvn spring-boot:run
后端服务将在 http://localhost:8088/api 启动
cd yb-red-mvp-frontend
npm install
npm run dev
前端服务将在 http://localhost:3000 启动
docker-compose up
# 构建后端镜像
cd yb-red-mvp-backend
docker build -t yb-red-mvp-backend .
# 构建前端镜像
cd yb-red-mvp-frontend
docker build -t yb-red-mvp-frontend .
| 接口 | 方法 | 描述 |
|---|---|---|
/api/captcha | GET | 获取图形验证码 |
/api/auth/login | POST | 登录/注册(自动注册) |
/api/auth/user-info | GET | 获取用户信息 |
| 接口 | 方法 | 描述 |
|---|---|---|
/api/orders | GET | 获取订单列表 |
/api/orders | POST | 创建订单 |
/api/orders/{id} | PUT | 更新订单 |
/api/orders/{id} | DELETE | 删除订单 |
| 接口 | 方法 | 描述 |
|---|---|---|
/api/yuanbao-accounts | GET | 获取账号列表 |
/api/yuanbao-accounts | POST | 创建账号 |
/api/yuanbao-accounts/{id} | PUT | 更新账号 |
/api/yuanbao-accounts/{id} | DELETE | 删除账号 |
/api/supply-demand/api/intermediary-matches/api/communities/api/red-packet-links/api/distribution-records/api/revenue-records/api/withdraw-records/api/customers/api/activity-rulesspring:
datasource:
url: jdbc:mysql://localhost:3306/yb_red_mvp
username: root
password: rootpassword
data:
redis:
host: localhost
port: 6379
password: password
server:
port: 8088
servlet:
context-path: /api
jwt:
secret: your-secret-key
expiration: 604800000 # 7天
server: {
port: 3000,
proxy: {
'/api': {
target: 'http://localhost:8088',
changeOrigin: true
}
}
}
后端:
前端:
src/api/ 添加 API 请求src/views/ 创建页面组件src/router/ 添加路由问题: 验证码图片无法显示
解决:
问题: 提示"验证码错误"或"验证码已过期"
解决:
问题: Access denied for user 'root'@'xxx'
解决: 检查 application.yml 中的数据库密码配置
问题: Unable to connect to Redis
解决: 确认 Redis 服务已启动,检查配置中的 host 和 port
问题: API 请求被 CORS 阻止
解决: 已配置 Vite 代理和后端 CORS,检查 proxy 配置
欢迎提交 Issue 和 Pull Request!
MIT License
注意: 本系统仅供学习交流使用,请遵守相关平台规则和法律法规。