feat: 集成 KieAI 服务,移除 models-integration 子项目
- 添加 Gemini 2.5 Flash 对话接口(流式+非流式) - 添加 NanoBanana 图像生成/编辑接口 - 添加 Sora2 视频生成接口(文生视频、图生视频、去水印) - 移除 models-integration 子项目(功能已迁移至主后端) - 新增测试文档和 Playwright E2E 配置 - 更新前端页面和 API 接口 - 更新后端配置和日志处理
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<view class="post-image" v-if="item.image">
|
||||
<image :src="item.image" mode="aspectFill" lazy-load></image>
|
||||
<!-- 类型标签 -->
|
||||
<view class="meal-tag">{{ item.mealType }}</view>
|
||||
<view class="meal-tag">{{ getMealTypeLabel(item.mealType) }}</view>
|
||||
<!-- 视频标记 -->
|
||||
<view class="video-badge" v-if="item.hasVideo || item.videoUrl">
|
||||
<text class="badge-icon">🎬</text>
|
||||
@@ -73,7 +73,7 @@
|
||||
<!-- 内容区域 -->
|
||||
<view class="post-content">
|
||||
<!-- 无图片时显示类型标签 -->
|
||||
<view class="type-tag" v-if="!item.image">{{ item.mealType }}</view>
|
||||
<view class="type-tag" v-if="!item.image">{{ getMealTypeLabel(item.mealType) }}</view>
|
||||
|
||||
<!-- 标题 -->
|
||||
<view class="post-title">{{ item.title }}</view>
|
||||
@@ -426,6 +426,21 @@ export default {
|
||||
return String(count)
|
||||
},
|
||||
|
||||
// 帖子类型英文转中文显示(仅用于展示,保证 label 均为中文)
|
||||
getMealTypeLabel(mealType) {
|
||||
if (!mealType) return '分享'
|
||||
const map = {
|
||||
breakfast: '早餐',
|
||||
lunch: '午餐',
|
||||
dinner: '晚餐',
|
||||
snack: '加餐',
|
||||
share: '分享',
|
||||
checkin: '打卡'
|
||||
}
|
||||
const lower = String(mealType).toLowerCase()
|
||||
return map[lower] != null ? map[lower] : '分享'
|
||||
},
|
||||
|
||||
// 格式化标签显示
|
||||
formatTag(tag) {
|
||||
if (!tag) return ''
|
||||
|
||||
Reference in New Issue
Block a user