Files
training/website/README.md
T
Pine 23f390902c 优化下载页面:像素字+彩虹渐变标题、修正背景、减少顶部间距
1. 标题对齐首页Hero风格:
   - 整个标题使用像素字体(--font-pixel)
   - YunOPC-Hub 使用彩虹渐变(--rainbow)文字
2. 内容区背景修正:
   - 添加品牌氛围渐变背景(顶部蓝色光晕+两侧点缀)
   - 与首页的设计氛围保持一致
3. 减少顶部间距:
   - .dl-wrap padding-top 从 48px 减到 8px
   - .dl-hero padding-top 从 56px 减到 26px
   - 内容整体上移,避免内容区过于靠下
4. 布局细节优化:
   - 各区块间距微调(版本条/平台卡片/更新说明)
   - 状态区(加载/错误)内边距优化
2026-09-07 09:45:26 +08:00

52 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OPC 培训站(website
> 📍 现位于 `code/training/website/`(业务 Web 前端,原 `code/opc-training/website/`)。课程内容见 `materials/培训计划/`;关联小程序 `code/training/miniprogram/`**后端为 `code/server-core`**`/api/*` 由 server-core `dispatcher.py` 统一分发,`/api` 旧培训端点走 `app/training/`,其余走平台应用)。
课程体系 0.1 的对外展示与内部运营站。React + Vite SPA,暗色粒子品牌语言。
## 运行方式
```bash
npm install
npm run dev # 开发:全部 API 走真实后端(.env.development → 本地 server-core
npm run build # 构建 dist.env.production → https://opc.pinesound.cn
npm run preview # 预览构建产物
node server/start.mjs # 纯静态托管 dist(默认 8091,演示用;API 由真实后端提供)
```
## API 基址(真实后端,无任何模拟接口)
| 环境 | VITE_API_BASE | 说明 |
|------|---------------|------|
| 开发 | `http://127.0.0.1:8090``.env.development` | 本地 server-core`uv run uvicorn dispatcher:app --port 8090` |
| 生产 | `https://opc.pinesound.cn``.env.production` | server-core dispatcher 单入口 |
- 代码兜底:`src/services/base.js`,未注入 `VITE_API_BASE` 时默认 `https://opc.pinesound.cn`
- 请求前缀分工(由 server-core `dispatcher.py` 分发):
- `/api/*`events/bookings/tests/ops/survey/policy/plan/upload/park 等旧培训端点)→ `app/training/`
- `/auth/*` `/opc/*` `/hall/*` `/admin/*` → 平台应用 `app.main`
- **项目内不包含任何 mock / 模拟接口实现**;`server/` 仅剩纯静态托管。
## 路由与权限
| 路由 | 内容 | 权限 |
|------|------|------|
| `#/` | 首页营销落地页 | 公开 |
| `#/opc-test` | OPC 创业基因测评 | 公开 |
| `#/pine``#/pine/*` | 内部工具(课程体系/结构/课程表/卡片/工具) | 需登录 |
**内部工具登录**:访问 `#/pine/*` 时路由守卫触发登录门,走真实后端 `/auth/login`(平台账号体系)。
内部工具**不进公开导航**,仅通过 URL 直达;公开导航只含「首页 / OPC测评」。
## 目录速览
```
server/ 纯静态托管服务(无任何模拟 API)
src/data/ 内容数据(home/system/structures/schedule/cards/timetable/opcTest/site
src/components/ 原子/分子/组织/模板组件
src/services/ API 服务(统一走 API_BASE → 真实后端)
.env.development dev 的 VITE_API_BASE(本地 server-core
.env.production 生产构建的 VITE_API_BASE
```