feat: P1批次1 设计域(AI推荐/分享体系/阳光房绘图/量尺标注/逐格指定编辑)
This commit is contained in:
+13
@@ -479,3 +479,16 @@ uv run uvicorn huamenchuang.main:app --reload # 启动,http://localhost:8000
|
||||
|
||||
- 未配置 Key 时接口返回 code=0,前端降级本地程序化渲染("本地 4 方案"按钮)
|
||||
- 前端:AI 炫图页两个模式(照片合成/风格速览)主按钮均走云端生成,结果大图展示 + 提示词折叠面板可查看 + PNG 下载;照片模式参考图自动压缩 ≤1536px JPEG
|
||||
|
||||
### 12.24 P1 设计域扩展(v2.29)
|
||||
|
||||
| 接口名称 | 方式 | URL 路径 | 请求参数 | 说明 |
|
||||
|---|---|---|---|---|
|
||||
| **AI 推荐窗型** | POST | `/api/ai-recommend` | `{width_mm, height_mm, room(living/bedroom/balcony/kitchen/bath/shop), needs[]: ventilation/light/sound/safe/view/door}` | 对齐 ai_recommend;规则引擎从样板库打分推荐 TOP5,含匹配分与可解释理由(宽高比/开扇数/玻璃面积比/门类/纱扇) |
|
||||
| **创建分享** | POST | `/api/shares` | `{type: render\|combine\|quote\|sunny, title, payload}` | 对齐 share-render/group-detail-share/quote_link;返回 `{token, url:/share/s/{token}}` |
|
||||
| 公开访问分享 | GET | `/api/shares/{token}` | 路径(无需登录) | 返回 `{type, title, payload, created_at}`;前端 `/share/s/:token` 公开页渲染(大图/报价明细/组合只读画布) |
|
||||
| 阳光房设计列表 | GET | `/api/sunroom/designs` | — | |
|
||||
| **保存阳光房设计** | POST | `/api/sunroom/designs` | `{name, roof: flat\|gable, width_mm, depth_mm, height_mm, bay_mm, glass, frame_color, order_id?}` | 对齐 sunnyhouse 平顶/人字顶;前端 SunroomCanvas 参数化 2D(正视+俯视),AI 效果图走 `/api/ai-render/generate`(scene=sunroom-flat/gable) |
|
||||
| 删除阳光房设计 | DELETE | `/api/sunroom/designs/{id}` | 路径 | |
|
||||
|
||||
**逐格扇/玻璃指定**(自研扩展 `drawing_data.sm[i].assigns[] = [{ri, sash:{kind: fixed/casement/awning/sliding/kfc, openToward, openDirection}, subBar, glass}]`):画布选格 → "扇/玻璃"对话框指定开启类型/方向/铰链侧/副梃/玻璃配置;2D 画开向三角与副梃线;算料计入指定扇框料+五金(`sash_count` 含 assigns)与副梃长度(`subbar` 默认 25 元/米,价格本可覆盖)。量尺拍照标注:洞口行 `photo` 字段存标注合成图(前端 Canvas 拖线标注)。
|
||||
|
||||
Reference in New Issue
Block a user