20 changed files with 419 additions and 1503 deletions
@ -0,0 +1,18 @@ |
|||||
|
<!-- OPENSPEC:START --> |
||||
|
# OpenSpec Instructions |
||||
|
|
||||
|
These instructions are for AI assistants working in this project. |
||||
|
|
||||
|
Always open `@/openspec/AGENTS.md` when the request: |
||||
|
- Mentions planning or proposals (words like proposal, spec, change, plan) |
||||
|
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work |
||||
|
- Sounds ambiguous and you need the authoritative spec before coding |
||||
|
|
||||
|
Use `@/openspec/AGENTS.md` to learn: |
||||
|
- How to create and apply change proposals |
||||
|
- Spec format and conventions |
||||
|
- Project structure and guidelines |
||||
|
|
||||
|
Keep this managed block so 'openspec update' can refresh the instructions. |
||||
|
|
||||
|
<!-- OPENSPEC:END --> |
||||
@ -0,0 +1,128 @@ |
|||||
|
# 智慧教务系统 |
||||
|
|
||||
|
## 项目概述 |
||||
|
|
||||
|
课程预约、消课、服务管理的企业级教务系统,支持学员端和教练端。 |
||||
|
|
||||
|
## 项目结构 |
||||
|
|
||||
|
``` |
||||
|
zhjwxt/ |
||||
|
├── admin/ # 管理后台 (Vue3 + Element Plus + TypeScript) |
||||
|
├── uniapp/ # 移动端客户端 (UniApp + Vue3 + TypeScript) |
||||
|
├── niucloud/ # ThinkPHP8 后端服务 |
||||
|
├── openspec/ # OpenSpec 规范文档 |
||||
|
├── docker/ # Docker 配置 |
||||
|
├── doc/ # 文档目录 |
||||
|
└── vendor/ # Composer 依赖 |
||||
|
``` |
||||
|
|
||||
|
## 技术栈 |
||||
|
|
||||
|
| 模块 | 技术栈 | |
||||
|
|------|--------| |
||||
|
| 后端 | ThinkPHP 8.0 + MySQL + Redis | |
||||
|
| 管理后台 | Vue3 + Element Plus + TypeScript + Vite | |
||||
|
| 移动端 | UniApp + Vue3 + TypeScript + Pinia | |
||||
|
|
||||
|
## 运行环境 |
||||
|
|
||||
|
### 数据库 |
||||
|
- **数据库名**: `niucloud` |
||||
|
- **用户名**: `niucloud` |
||||
|
- **密码**: `niucloud123` |
||||
|
|
||||
|
### 服务端口 |
||||
|
- **后端 API**: `http://localhost:20080` |
||||
|
- 客户端接口: `/api` |
||||
|
- 管理端接口: `/adminapi` |
||||
|
- **管理后台**: `http://localhost:23000` |
||||
|
- **移动端 H5**: `http://localhost:8080` |
||||
|
|
||||
|
### 启动命令 |
||||
|
```bash |
||||
|
# 启动所有服务 (Docker) |
||||
|
./start.sh |
||||
|
|
||||
|
# 单独启动后端 |
||||
|
cd niucloud && php think serve |
||||
|
|
||||
|
# 启动管理后台 |
||||
|
cd admin && npm run dev |
||||
|
|
||||
|
# 启动移动端 |
||||
|
cd uniapp && npm run dev:h5 |
||||
|
``` |
||||
|
|
||||
|
## 核心功能模块 |
||||
|
|
||||
|
### 课程管理 |
||||
|
- 课程创建/编辑/删除 |
||||
|
- 课程排期 |
||||
|
- 课程类型管理 |
||||
|
|
||||
|
### 预约管理 |
||||
|
- 学员预约 |
||||
|
- 预约审核 |
||||
|
- 预约取消/改期 |
||||
|
|
||||
|
### 消课管理 |
||||
|
- 消课记录 |
||||
|
- 消课统计 |
||||
|
- 消课审核 |
||||
|
|
||||
|
### 学员管理 |
||||
|
- 学员信息 |
||||
|
- 学员卡管理 |
||||
|
- 学员消费记录 |
||||
|
|
||||
|
### 教练管理 |
||||
|
- 教练信息 |
||||
|
- 教练排班 |
||||
|
- 教练绩效 |
||||
|
|
||||
|
## 端点说明 |
||||
|
|
||||
|
### 移动端目录 |
||||
|
| 目录 | 说明 | |
||||
|
|------|------| |
||||
|
| `pages/common/` | 通用页面(登录、设置等) | |
||||
|
| `pages/student/` | 学员端页面 | |
||||
|
| `pages/coach/` | 教练端页面 | |
||||
|
| `pages-coach/` | 教练端专属页面 | |
||||
|
| `pages-common/` | 通用页面模块 | |
||||
|
|
||||
|
### 后端目录 |
||||
|
| 目录 | 说明 | |
||||
|
|------|------| |
||||
|
| `app/adminapi/controller/` | 管理后台接口 | |
||||
|
| `app/api/controller/` | 客户端接口 | |
||||
|
| `app/service/admin/` | 管理后台业务逻辑 | |
||||
|
| `app/service/api/` | 客户端业务逻辑 | |
||||
|
| `app/model/` | 数据模型 | |
||||
|
|
||||
|
## 测试账号 |
||||
|
|
||||
|
### 管理后台 |
||||
|
- **地址**: `http://localhost:23000` |
||||
|
- **用户名**: `admin` |
||||
|
- **密码**: `123123` |
||||
|
|
||||
|
## 开发规范 |
||||
|
|
||||
|
### 新增功能流程 |
||||
|
1. 后端:控制器 → Service → Model |
||||
|
2. 前端:API → 页面组件 |
||||
|
3. 路由:注册新页面路由 |
||||
|
|
||||
|
### 文件命名 |
||||
|
- 控制器:`Xxx.php` |
||||
|
- Service:`XxxService.php` |
||||
|
- Model:`Xxx.php` |
||||
|
- 页面:`.vue` |
||||
|
|
||||
|
## 相关项目 |
||||
|
|
||||
|
- **钜惠云仓商城项目**: `/Users/mac/coding/juhuiyuncang/juhuiyuncloudadmin` |
||||
|
- **数据采集项目**: `/Users/mac/coding/juhuiyuncang/datahandle` |
||||
|
- **物流项目**: `/Users/mac/coding/juhuiyuncang/groupeddelivery` |
||||
File diff suppressed because it is too large
@ -0,0 +1,84 @@ |
|||||
|
# 智慧教务系统 - 问题记录 |
||||
|
|
||||
|
> 记录浏览代码过程中遇到的业务问题,等待老王解答 |
||||
|
|
||||
|
## 1. 课程预约流程 |
||||
|
|
||||
|
**问题**:学员预约课程的完整流程是什么? |
||||
|
|
||||
|
- 学员如何查看可预约的课程? |
||||
|
- 预约是否需要教练确认? |
||||
|
- 预约失败的原因有哪些? |
||||
|
|
||||
|
**涉及文件**: |
||||
|
- `niucloud/app/api/controller/` (预约相关控制器) |
||||
|
- `uniapp/pages/student/` (学员端页面) |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 2. 消课机制 |
||||
|
|
||||
|
**问题**:消课是如何触发的? |
||||
|
|
||||
|
- 教练手动消课还是系统自动消课? |
||||
|
- 消课前是否需要学员确认? |
||||
|
- 消课金额如何计算? |
||||
|
|
||||
|
**涉及文件**: |
||||
|
- `niucloud/app/service/api/` (消课相关 Service) |
||||
|
- `uniapp/pages/` (消课页面) |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 3. 学员卡类型 |
||||
|
|
||||
|
**问题**:学员卡的类型和有效期规则是什么? |
||||
|
|
||||
|
- 看到学员卡相关的数据库表 |
||||
|
- 支持哪些类型的卡(次卡、月卡、季卡等)? |
||||
|
- 过期后如何处理? |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 4. 教练排班 |
||||
|
|
||||
|
**问题**:教练的排班是如何管理的? |
||||
|
|
||||
|
- 排班是教练自己设置还是管理员设置? |
||||
|
- 排班冲突如何检测? |
||||
|
- 临时调课如何处理? |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 5. 多端权限 |
||||
|
|
||||
|
**问题**:学员端和教练端的权限如何区分? |
||||
|
|
||||
|
- 看到 `pages/student/` 和 `pages/coach/` 目录 |
||||
|
- 权限是如何控制的? |
||||
|
- 是否支持管理员角色? |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 6. 数据同步 |
||||
|
|
||||
|
**问题**:管理后台和移动端的数据如何同步? |
||||
|
|
||||
|
- 看到有 `adminapi` 和 `api` 两套接口 |
||||
|
- 数据是否实时同步? |
||||
|
- 是否有离线支持? |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## 待确认的业务规则 |
||||
|
|
||||
|
1. **预约规则**:学员可以提前多久预约?是否可以取消预约? |
||||
|
2. **消课规则**:消课后是否立即扣减学员卡余额? |
||||
|
3. **教练提成**:教练的提成是如何计算的? |
||||
|
4. **退款规则**:学员如何申请退款?退款流程是什么? |
||||
|
5. **课时管理**:总课时和已消课时的关系是什么? |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
> **记录时间**:2026-02-01 |
||||
|
> **状态**:待回答 |
||||
Loading…
Reference in new issue