feat: T10 回归测试 Bug 修复与功能完善

修复 BUG-001 至 BUG-009 及 T10-1 至 T10-6 相关问题:
- 打卡积分显示与累加逻辑优化
- 食谱计算器 Tab 选中样式修复
- 食物百科列表图片与简介展示修复
- 食物详情页数据加载修复
- AI营养师差异化回复优化
- 健康知识/营养知识名称统一
- 饮食指南/科普文章详情页内容展示修复
- 帖子营养统计数据展示修复
- 社区帖子类型中文命名统一
- 帖子详情标签中文显示修复
- 食谱营养AI填充功能完善
- 食谱收藏/点赞功能修复

新增:
- ToolNutritionFillService 营养填充服务
- T10 回归测试用例 (Playwright)
- 知识文章数据 SQL 脚本

涉及模块:
- crmeb-common: VO/Request/Response 优化
- crmeb-service: 业务逻辑完善
- crmeb-front: API 接口扩展
- msh_single_uniapp: 前端页面修复
- tests/e2e: 回归测试用例
This commit is contained in:
2026-03-05 09:35:00 +08:00
parent 6f2dc27fbc
commit d8d2025543
44 changed files with 1536 additions and 165 deletions

View File

@@ -623,7 +623,8 @@ export default {
async sendToAI(content, type) {
this.isLoading = true;
// 文本对话必须走 KieAI GeminiPOST /api/front/kieai/gemini/chat请求体 { messages: [{ role: 'user', content }], stream: false }
// BUG-005文本/多模态必须走 KieAI Gemini,回复仅从 data.choices[0].message.content 取,不得使用固定话术
// 请求体: { messages: [{ role: 'user', content }], stream: false }
if (type === 'text' || type === 'multimodal') {
try {
const messages = [{ role: 'user', content: content }];
@@ -635,6 +636,7 @@ export default {
const msgObj = choice && choice.message;
const rawContent = msgObj && msgObj.content;
const reply = rawContent != null ? this.extractReplyContent(rawContent) : '';
// 成功时仅展示模型返回内容
this.messageList.push({ role: 'ai', content: reply || '未能获取到有效回复。' });
} else {
const msg = (response && response.message) || '发起对话失败';