Files
JieXi/开发记录/2025-11-30-会话记录.md
2025-11-30 19:49:25 +08:00

100 lines
2.8 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.
# 开发会话记录 - 2025-11-30
## 本次会话完成的功能
### 1. API Key 内联管理(个人中心)
- 将 API Key 管理功能直接嵌入到个人中心页面
- 支持创建、查看、启用/禁用、删除 API Key
- 新创建的 Key 只显示一次,提示用户立即复制
- 文件修改:`templates/profile.html`
### 2. 用户套餐到期时间管理
- 管理后台编辑用户时可设置套餐到期时间
- VIP/SVIP 用户显示到期时间输入框
- 游客和普通用户不显示(永久有效)
- 用户列表显示套餐到期状态
- 文件修改:
- `templates/admin_users.html`
- `routes/admin.py`get_users、update_user
### 3. 自定义下拉框组件
- 创建美观的自定义下拉框替代浏览器原生 select
- 自动初始化所有 `.ui-input``.ui-select` 下拉框
- 支持键盘操作Enter/Space 打开Escape 关闭)
- 点击外部自动关闭
- 动态选项更新支持
- 文件修改:
- `static/css/ui-components.css`
- `static/js/ui-components.js`
### 4. 平台选项更新
- 管理后台所有平台下拉框添加新平台选项
- 新增:快手(kuaishou)、皮皮虾(pipixia)、微博(weibo)
- 文件修改:
- `templates/admin_apis.html`
- `templates/admin_logs.html`
- `templates/admin_health_checks.html`
---
## 之前会话完成的功能(摘要)
### 兑换码系统
- 管理员批量生成兑换码
- 用户在个人中心兑换升级套餐
- 支持套餐时间叠加
- 文件:`models/__init__.py``routes/admin.py``routes/auth.py``templates/admin_redeem_codes.html`
### 视频代理下载
- 解决防盗链问题Referer
- 支持多平台域名白名单
- 文件:`routes/main.py`
### B站短链接支持
- 自动展开 b23.tv 短链接
- 文件:`parsers/factory.py`
### 前端优化
- 粘贴按钮、清空按钮
- 解析进度条
- 视频播放器缓存修复
- 文件:`templates/index.html`
---
## 项目当前支持的平台
1. 抖音 (douyin)
2. TikTok (tiktok)
3. 哔哩哔哩 (bilibili)
4. 快手 (kuaishou)
5. 皮皮虾 (pipixia)
6. 微博 (weibo)
---
## 关键文件清单
### 后端路由
- `routes/auth.py` - 用户认证、个人中心、兑换码
- `routes/admin.py` - 管理后台 API
- `routes/parser.py` - 视频解析 API
- `routes/api_v1.py` - 外部 APIAPI Key 认证)
- `routes/apikey.py` - API Key 管理
- `routes/main.py` - 主页、代理下载
### 前端模板
- `templates/index.html` - 首页
- `templates/profile.html` - 个人中心
- `templates/admin_*.html` - 管理后台页面
### 静态资源
- `static/css/ui-components.css` - UI 组件样式
- `static/js/ui-components.js` - UI 组件脚本
### 数据模型
- `models/__init__.py` - 所有数据库模型
### 解析器
- `parsers/factory.py` - 解析器工厂
- `parsers/base.py` - 基础解析器类