feat: 平台配置表扩展配图/字数字段,微信公众号正文插入配图,合规检查从DB读规则

- PlatformConfig模型新增requires_image、image_count_min/max、image_width/height、min_words/max_words
- schemas.py同步PlatformConfigBase/Create/Update/Response新字段
- initial_data.py为三大平台填充初始值(微信需配图、字数800-1500等)
- database.py添加新列ALTER TABLE迁移
- platforms.html重写编辑弹窗(正确字段名+配图/字数设置)
- writer.py微信公众号文章正文h1后插入<img>占位
- compliance_checker.py接受platform_config参数,从DB读取规则替代硬编码
- compliance_optimizer.py启动时加载DB平台配置传入checker
This commit is contained in:
Yuzhiran Dev
2026-05-17 23:08:43 +08:00
parent 5674114599
commit 41b0f694ee
9 changed files with 174 additions and 51 deletions
+4 -1
View File
@@ -3,7 +3,7 @@
> 本文件为项目进度唯一真理源,所有进度信息以此为准。
> 其他文档中的进度描述一律以本文为准。
**最后更新**2026-05-16 (v14)
**最后更新**2026-05-17 (v15)
---
@@ -117,6 +117,9 @@
| Phase 4 多租户隔离 (JWT+API 层) | 2026-05-16 | org_id 注入 JWT payload; 12 个 API 模块添加 org 过滤; 创建选题自动继承用户 org; 管理端组织 CRUD |
| Phase 4 前端多租户 | 2026-05-16 | admin.html 新增组织管理标签页 (列表/创建/编辑/删除); users.html 增加组织列+H5卡片显示 |
| Phase 4 预置数据修复 | 2026-05-16 | initial_data.py 管理员用户添加 org_id; opencode-go LLM config 补全 user_prompt_template |
| PlatformConfig 模型字段扩展 | 2026-05-17 | 增加 requires_image/image_count_min/image_count_max/image_width/image_height/min_words/max_words; schemas/initial_data/前端表单同步; database.py 迁移 |
| 微信公众号正文配图 | 2026-05-17 | writer.py wechat 分支在 h1 后插入 `<img>` 占位 |
| 合规检查从 DB 读平台规则 | 2026-05-17 | compliance_checker.py 接受 platform_config 参数; compliance_optimizer.py 从 DB 加载平台配置传入 checker |
### ⏳ 待办