- ASP.NET Core 9 Web API backend with JWT auth, EF Core MySQL - Vue 3 + Vite + Pinia + Ant Design Vue frontend - Multi-platform connection management (UOOC & Zhihuishu) - Video brushing with AES-CBC encryption for Zhihuishu - Multi-task queue with cross-platform parallel execution - Task persistence via MySQL database - Progress tracking with inline catalog enrichment - Mobile-responsive UI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
134 lines
3.6 KiB
Markdown
134 lines
3.6 KiB
Markdown
# Uooc Progress Platform
|
||
|
||
Vue 3 + ASP.NET Core 学习进度平台,现已拆分为两层身份:
|
||
|
||
- 系统自身账号:注册、登录、角色、管理员菜单、权限控制
|
||
- 网课平台会话:登录系统后单独绑定 `uooc_auth`,仅用于读取课程与进度
|
||
|
||
## Features
|
||
|
||
- 独立的系统登录页与注册页
|
||
- 左侧后台菜单栏 + 右上角用户头像悬浮菜单
|
||
- 普通用户与管理员分权限菜单
|
||
- MySQL 持久化用户、邀请码、系统设置
|
||
- JWT 系统登录态
|
||
- 单独的网课平台 `uooc_auth` 绑定页
|
||
- 课程选择、进度聚合和上游异常 mock 回退
|
||
|
||
## Project Structure
|
||
|
||
- `frontend/`: Vue 3 + Vite + Pinia 前端
|
||
- `backend/src/UoocProgress.Api/`: ASP.NET Core Web API、JWT、EF Core MySQL、静态资源托管
|
||
|
||
## Local Run
|
||
|
||
### 1. 准备 MySQL
|
||
|
||
创建数据库并修改连接串:
|
||
|
||
```sql
|
||
CREATE DATABASE uooc_progress_dev CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||
```
|
||
|
||
默认开发配置位于:
|
||
|
||
- [backend/src/UoocProgress.Api/appsettings.Development.json](C:/Users/nanxun/Documents/uooc/backend/src/UoocProgress.Api/appsettings.Development.json)
|
||
- [backend/src/UoocProgress.Api/appsettings.json](C:/Users/nanxun/Documents/uooc/backend/src/UoocProgress.Api/appsettings.json)
|
||
|
||
首次启动会自动建表,并按 `BootstrapAdmin` 创建种子管理员账号。
|
||
|
||
### 2. 构建前端
|
||
|
||
```powershell
|
||
cd C:\Users\nanxun\Documents\uooc\frontend
|
||
npm install
|
||
npm run build
|
||
```
|
||
|
||
### 3. 启动后端
|
||
|
||
```powershell
|
||
cd C:\Users\nanxun\Documents\uooc
|
||
dotnet run --project .\backend\src\UoocProgress.Api\UoocProgress.Api.csproj
|
||
```
|
||
|
||
打开 [http://localhost:5088](http://localhost:5088)。
|
||
|
||
### 4. 分离开发模式
|
||
|
||
```powershell
|
||
cd C:\Users\nanxun\Documents\uooc\frontend
|
||
npm install
|
||
npm run dev
|
||
|
||
cd C:\Users\nanxun\Documents\uooc
|
||
dotnet run --project .\backend\src\UoocProgress.Api\UoocProgress.Api.csproj
|
||
```
|
||
|
||
Vite 会把 `/api` 代理到 `http://localhost:5088`。
|
||
|
||
## Default Admin
|
||
|
||
默认管理员配置来自 `BootstrapAdmin`:
|
||
|
||
- 用户名:`admin`
|
||
- 密码:`Admin123!`
|
||
|
||
建议启动后立即登录并修改密码。
|
||
|
||
## Backend Endpoints
|
||
|
||
公开接口:
|
||
|
||
- `GET /api/public/auth-config`
|
||
|
||
系统认证:
|
||
|
||
- `POST /api/auth/register`
|
||
- `POST /api/auth/login`
|
||
- `GET /api/auth/me`
|
||
- `POST /api/auth/change-password`
|
||
|
||
平台:
|
||
|
||
- `GET /api/platforms`
|
||
- `GET /api/platforms/{platformId}/schemas/login`
|
||
- `GET /api/platforms/{platformId}/schemas/course-query`
|
||
|
||
平台连接:
|
||
|
||
- `GET /api/platform-connections`
|
||
- `POST /api/platform-connections`
|
||
- `POST /api/platform-connections/{connectionId}/relogin`
|
||
- `POST /api/platform-connections/{connectionId}/activate`
|
||
- `DELETE /api/platform-connections/{connectionId}`
|
||
- `POST /api/platform-connections/{connectionId}/courses/query`
|
||
- `GET /api/platform-connections/{connectionId}/catalog?courseId=...`
|
||
- `GET /api/platform-connections/{connectionId}/progress?courseId=...`
|
||
|
||
浏览器挑战:
|
||
|
||
- `GET /api/platform-challenges/{challengeSessionId}`
|
||
|
||
管理员接口:
|
||
|
||
- `GET /api/admin/users`
|
||
- `PATCH /api/admin/users/{id}`
|
||
- `GET /api/admin/invites`
|
||
- `POST /api/admin/invites`
|
||
- `PATCH /api/admin/invites/{id}`
|
||
- `GET /api/admin/settings`
|
||
- `PUT /api/admin/settings`
|
||
- `GET /api/admin/platforms`
|
||
- `POST /api/admin/platforms`
|
||
- `GET /api/admin/platforms/{id}`
|
||
- `PUT /api/admin/platforms/{id}`
|
||
- `PATCH /api/admin/platforms/{id}/status`
|
||
- `POST /api/admin/platforms/{id}/clone`
|
||
|
||
## Notes
|
||
|
||
- 网课平台 `uooc_auth` 不会写入后端数据库,只保存在当前浏览器本地。
|
||
- 不同系统账号会使用不同的本地缓存命名空间,课程关注和进度快照不会串号。
|
||
- 如果没有真实 `uooc_auth`,可以在“网课平台连接”页填写 `mock-session` 体验演示数据。
|