feat: 集成 KieAI 服务,移除 models-integration 子项目

- 添加 Gemini 2.5 Flash 对话接口(流式+非流式)
- 添加 NanoBanana 图像生成/编辑接口
- 添加 Sora2 视频生成接口(文生视频、图生视频、去水印)
- 移除 models-integration 子项目(功能已迁移至主后端)
- 新增测试文档和 Playwright E2E 配置
- 更新前端页面和 API 接口
- 更新后端配置和日志处理
This commit is contained in:
2026-03-03 15:33:50 +08:00
parent 1ddb051977
commit 4be53dcd1b
586 changed files with 21142 additions and 25130 deletions

View File

@@ -26,8 +26,8 @@
</view>
</view>
<!-- 四大功能入口 -->
<view class="function-grid">
<!-- 四大功能入口根据系统配置 eb_system_config.field01=1 时显示 -->
<view class="function-grid" v-if="showFunctionEntries">
<view class="function-item calculator" @tap="goToCalculator">
<view class="function-content">
<view class="function-text">
@@ -64,7 +64,7 @@
<view class="function-item nutrition-knowledge" @tap="goToNutritionKnowledge">
<view class="function-content">
<view class="function-text">
<view class="function-title">营养知识</view>
<view class="function-title">健康知识</view>
<view class="function-desc">专业营养指导</view>
</view>
<view class="function-icon">
@@ -156,7 +156,8 @@
import {
getRecommendedRecipes,
getRecommendedKnowledge,
getUserHealthStatus
getUserHealthStatus,
getHomeDisplayConfig
} from '@/api/tool.js';
import { mapGetters } from 'vuex';
import { toLogin, checkLogin } from '@/libs/login.js';
@@ -177,6 +178,7 @@ import {
hasProfile: false,
profileStatus: '尚未完成健康档案'
},
showFunctionEntries: false,
loading: false
}
},
@@ -198,16 +200,18 @@ import {
async loadData() {
this.loading = true;
try {
// 并行加载数据
const [recipesRes, knowledgeRes, healthRes] = await Promise.all([
// 并行加载数据含首页展示配置field01=1 时显示四大功能入口)
const [recipesRes, knowledgeRes, healthRes, displayConfigRes] = await Promise.all([
getRecommendedRecipes({ limit: 2 }).catch(() => ({ data: [] })),
getRecommendedKnowledge({ limit: 2 }).catch(() => ({ data: [] })),
getUserHealthStatus().catch(() => ({ data: { hasProfile: false, profileStatus: '尚未完成健康档案' } }))
getUserHealthStatus().catch(() => ({ data: { hasProfile: false, profileStatus: '尚未完成健康档案' } })),
getHomeDisplayConfig().catch(() => ({ data: { showFunctionEntries: false } }))
]);
this.recipeList = recipesRes.data?.list || recipesRes.data || [];
this.knowledgeList = knowledgeRes.data?.list || knowledgeRes.data || [];
this.userHealthStatus = healthRes.data || { hasProfile: false, profileStatus: '尚未完成健康档案' };
this.showFunctionEntries = !!(displayConfigRes.data && displayConfigRes.data.showFunctionEntries);
} catch (error) {
console.error('加载数据失败:', error);
uni.showToast({
@@ -226,9 +230,14 @@ import {
},
// 跳转到打卡页面
handleCheckin() {
if (!checkLogin()) {
uni.showToast({ title: '请先登录', icon: 'none' });
setTimeout(() => toLogin(), 500);
return;
}
uni.navigateTo({
url: '/pages/tool/checkin'
})
});
},
// 跳转到食谱计算器
goToCalculator() {