11 Commits
Author SHA1 Message Date
jinghui 23e898b5e0 v1.4.21: README 新增界面截图章节(5 张真机截图入库 docs/screenshots) 2026-11-23 16:01:11 +08:00
jinghui 5f60be9462 v1.4.20: 右上角新增下载更多素材入口 2026-11-23 15:18:24 +08:00
jinghui 71c5d25862 v1.4.19: AI视频两步生成文案 + 模型默认值/免费注册引导 2026-11-23 15:12:17 +08:00
jinghui 9c7b695081 v1.4.18: AI视频支持设置目标时长(画面与配音精确对齐) 2026-11-22 14:25:31 +08:00
jinghui edfbb67cdb v1.4.17: AI视频生成使用全部选中图片 + 转场效果选择 2026-11-22 12:48:51 +08:00
jinghui 254a939f55 v1.4.16: AI视频生成完成不再自动关闭弹窗 + 支持选择保存目录
- 生成完成后弹窗保持打开(原 1.2s 后自动 onClose 移除),手动「关闭并刷新」
- 新增「保存到目录」下拉(素材库根目录+全部子文件夹),后端按 saveDir 落库
- 双击图片灯箱:onDoubleClick 增加 preventDefault 防浏览器吞双击事件
2026-11-22 12:00:08 +08:00
jinghui bf69419c68 v1.4.15: fix getOriginalUrl/getThumbnailUrl URL encoding for paths with Chinese/spaces/#/? 2026-11-20 21:17:16 +08:00
jinghui d6b1989a4c /vol2/1000/HD2 改为整盘挂载 (以后新建目录直接可添加素材库)
- 5 个逐目录挂载合并为 1 行父挂载, 等价无损
- 端到端验证: 新建零配置目录建库 200, 清理无残留
- README compose/docker run 示例与部署注释同步简化, CHANGELOG 并入 v1.4.14
2026-11-20 20:54:24 +08:00
jinghui f0a59e6642 补挂载 /vol2/1000/HD2/学习资料 (修「素材库路径不存在」)
- docker-compose.yml volumes + README compose/docker run 两处示例
- 端到端建库验证 200 通过, 清理无残留; CHANGELOG 并入 v1.4.14 条目
2026-11-20 20:48:21 +08:00
jinghui a793eadb32 v1.4.14: 灯箱缩略图条只列图片(视频/文档不混入) + 新增素材目录挂载
- 灯箱列表 lightboxImages 只收图片, providerImages/PhotoStrip 同源对齐
- handleImageDoubleClick 全量索引→图片子集索引映射, 视频/文档双击仍走 FileViewer
- docker-compose.yml/README 补挂载 /vol2/1000/HD2/素材 (修「素材库路径不存在」)
- 版本 4 处升 1.4.14
2026-11-20 19:22:34 +08:00
jinghui d9c61306fe feat: 灯箱底部缩略图条 + 幻灯片播放(可选间隔) (v1.4.13) 2026-11-20 00:07:20 +08:00
20 changed files with 649 additions and 75 deletions

No files matched your search

+35
View File
@@ -1,5 +1,40 @@
# 更新日志 # 更新日志
## 2026-11-23 → v1.4.21
- 📸 **README 新增「界面截图」章节**:加入 5 张 1600×900 真机截图(主界面 / 瀑布流 / OCR 图内文字搜索 / AI 一键成片 / 设置页),截图随仓库提交至 `docs/screenshots/`,相对路径引用不依赖外部图床
## 2026-11-23 → v1.4.20
- ✨ **右上角新增「下载更多素材」入口**:顶栏图标组最左侧新增蓝色描边按钮(下载图标 + 文字),点击新标签页打开素材模板下载页(doc.88531.cn 素材模板系列,含各类素材/模板/福利合集);窄屏(<1024px)自动收起为纯图标不挤占顶栏,鼠标悬停有「下载更多素材」提示
## 2026-11-23 → v1.4.19
- ✨ **AI 视频「模型提供商」默认值**:设置 → AI 视频 选「单独配置提供商 / 模型 / Key」时,接口地址默认填 `https://ai.88531.cn/v1`、模型默认填 `mimo-v2.6-flash`(后端 DEFAULTS 与前端兜底同步,新装/未配置即开箱可用)
- ✨ **免费注册额度引导**:该面板新增蓝色引导卡——没有 API Key 可前往 ai.88531.cn 免费注册(注册送体验金、每天签到再领 ¥0.5),登录后在「令牌」页创建 Key 粘贴即可
- ✨ **AI 生成文案两步流程**:生成弹窗标题行新增「AI 生成文案」按钮,一键出分镜文案到可编辑文本框;点「开始生成」按**你编辑后的文案**原样出片(后端新增 `/api/video/gen-script`,`script` 字段直通分镜,不再被 LLM 改写、不循环朗读、不虚增段数)
## 2026-11-19 → v1.4.14
- ✨ **灯箱只显示图片**:双击图片打开灯箱后,底部缩略图条只列出当前文件夹(含筛选)下的图片,mp4/md 等打不开的文件不再混入(此前显示出来也点不开,纯属干扰)
- 灯箱列表本身也同步过滤为纯图片:左右方向键/箭头按钮翻页不会再翻到视频、文档等打不开的项;顶部「序号 / 总数」与缩略图条均按图片计数
- 视频、文档的行为不变:双击仍弹出各自的播放/查看器,不进灯箱
- 🔧 **新增「素材」目录挂载**:docker-compose.yml 与 README(compose / docker run 两种方式)补挂载 `/vol2/1000/HD2/素材`,该目录可正常添加为素材库(此前报「素材库路径不存在」)
- 🔧 **新增「学习资料」目录挂载**:docker-compose.yml 与 README(compose / docker run 两种方式)补挂载 `/vol2/1000/HD2/学习资料`(同上修复「素材库路径不存在」,端到端建库验证通过)
- 🔧 **挂载方式升级为整盘**:`/vol2/1000/HD2` 下 5 个逐目录挂载合并为一行整盘挂载 `- /vol2/1000/HD2:/vol2/1000/HD2` —— 该盘下任意子目录(含以后在飞牛上新建的文件夹)可直接在页面添加为素材库,不再需要改配置重启;README compose / docker run 示例同步简化
## 2026-11-20 → v1.4.15
- 🐛 **修复「部分目录图片双击不弹出灯箱」**:`getOriginalUrl`/`getThumbnailUrl` 未对含中文/空格/#/? 的路径做 URL 编码,原图请求 404 → 灯箱图片加载失败 → 用户感知「双击不弹」。按 `/` 分段 `encodeURIComponent` 修复,灯箱/新窗口打开/导出/编辑 全链路受益
- ✨ **灯箱底部新增缩略图条**:双击图片放大后,底部列出当前文件夹(含筛选结果)的全部图片缩略图,点任意一张直接跳转查看,不用一张张翻
- 缩略图条显示「当前序号 / 总数」,当前图紫色高亮并自动滚动居中;切图时(含左右方向键/箭头按钮)缩略图条同步跟随
- 缩略图走原 thumbnail 缩略图接口全量加载(弹层滚动容器内不使用 lazy,避免 Chromium 中永不加载),无缩略图的文件显示格式角标兜底
- 缩略图条通过 portal 挂到 body、层级压在灯箱(z-index 2000)之上,不被祖先层叠上下文遮挡;数据与灯箱图片列表同源同序,跳转序号严格对齐
- ✨ **幻灯片播放**:缩略图条左侧新增 ▶ 播放 / ⏸ 暂停按钮,开启后按选定间隔自动切下一张,放完最后一张循环回首张;手动点缩略图或用箭头切图时计时器重新计时,每张图都停留满一个间隔;关闭灯箱自动停播
- 切换间隔可选 1 / 2 / 3 / 5 / 10 秒(下拉选择),选择存 localStorage 下次沿用,默认 3 秒
- 修复缩略图破图:后端对部分视频缩略图返回 0 字节 webp 导致浏览器显示碎图,加载失败自动退化为格式角标
## 2026-11-19 → v1.4.12 ## 2026-11-19 → v1.4.12
- ✨ **设置 → AI 生图新增「免费生图:Cloudflare Workers AI 提供商」说明卡**:标注每日免费额度(10000 neurons/天,北京时间 08:00 重置,FLUX.1 schnell 约 10 neurons/张 ≈ 每天约 1000 张),并给出两步申请地址——① 注册 Cloudflare 账号(免费、无需信用卡)② 创建 API Token(Workers AI Run 权限),含 Token 创建提示 - ✨ **设置 → AI 生图新增「免费生图:Cloudflare Workers AI 提供商」说明卡**:标注每日免费额度(10000 neurons/天,北京时间 08:00 重置,FLUX.1 schnell 约 10 neurons/张 ≈ 每天约 1000 张),并给出两步申请地址——① 注册 Cloudflare 账号(免费、无需信用卡)② 创建 API Token(Workers AI Run 权限),含 Token 创建提示
+38 -11
View File
@@ -6,6 +6,36 @@
- 访问:`http://<主机IP>:15002`(首次打开设置管理员密码,随后添加素材库) - 访问:`http://<主机IP>:15002`(首次打开设置管理员密码,随后添加素材库)
## 📸 界面截图
以下为真机实拍截图(1600×900,v1.4.21):
### 主界面
![主界面](docs/screenshots/01-dashboard.png)
### 瀑布流浏览
![瀑布流浏览](docs/screenshots/02-waterfall.jpg)
### OCR 图内文字搜索
输入关键词即可搜索图片里的文字(支持多关键词空格分隔):
![OCR 图内文字搜索](docs/screenshots/03-ocr-search.jpg)
### AI 一键生成视频
提示词 / 链接抓取 / 文档 / 素材库图片四种输入方式,AI 生成文案 + 逐句朗读:
![AI 一键生成视频](docs/screenshots/04-ai-video.png)
### 设置页
本地 OCR(tesseract)免费离线,随容器内置零配置;也可切换线上视觉大模型:
![设置页](docs/screenshots/05-settings.jpg)
## ✨ 本分支修改的功能 ## ✨ 本分支修改的功能
### 1. Docker 独立部署(新增) ### 1. Docker 独立部署(新增)
@@ -29,8 +59,9 @@
- **关于**:当前版本号、开源地址 - **关于**:当前版本号、开源地址
- 配置持久化在 `config/settings.json`,保存后**立即生效**,无需重启 - 配置持久化在 `config/settings.json`,保存后**立即生效**,无需重启
### 4. 右上角:开源地址 / 版本号 / 通知(新增) ### 4. 右上角:下载更多素材 / 开源地址 / 版本号 / 通知(新增)
- ⬇ **下载更多素材**:顶栏图标组最左侧的蓝色描边按钮,点击新标签页打开素材模板下载页(`doc.88531.cn` 素材模板系列,各类素材/模板/福利合集,定期更新);窄屏自动收起为纯图标,悬停显示提示
- 🔗 **开源地址**:一键打开 `gitea.88531.cn/jinghui/flypic` - 🔗 **开源地址**:一键打开 `gitea.88531.cn/jinghui/flypic`
- 🔔 **通知公告**:铃铛带未读红点,下拉展示授权系统推送的公告与在线人数 - 🔔 **通知公告**:铃铛带未读红点,下拉展示授权系统推送的公告与在线人数
- **版本号徽标**:显示当前运行版本(`v1.2.0`) - **版本号徽标**:显示当前运行版本(`v1.2.0`)
@@ -99,10 +130,8 @@ services:
ports: ports:
- "15002:15002" - "15002:15002"
volumes: volumes:
# 素材库目录(容器内路径与宿主机一致,中文路径直接填,按需增减) # 数据盘整盘挂载(容器内路径与宿主机一致,中文路径直接填):盘下任意子目录含以后新建的,可直接添加为素材库
- /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸 - /vol2/1000/HD2:/vol2/1000/HD2
- /vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档
- /vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频
# 持久化配置(素材库列表、管理员密码,不用改) # 持久化配置(素材库列表、管理员密码,不用改)
- /vol3/1000/HD3/docker/flypic/config:/root/.flypic - /vol3/1000/HD3/docker/flypic/config:/root/.flypic
environment: environment:
@@ -116,10 +145,10 @@ services:
``` ```
```bash ```bash
# 首次部署(编辑 volumes 换成你的素材库目录) # 首次部署(编辑 volumes 把整盘或你的素材目录挂进来)
docker compose up -d --build docker compose up -d --build
# 新增素材库:volumes 加一行挂载后重启 # 新增素材库:整盘挂载后直接在页面添加即可,无需改配置
docker compose up -d docker compose up -d
# 更新代码 # 更新代码
@@ -142,15 +171,13 @@ docker run -d --name flypic --restart unless-stopped \
-e FRONTEND_DIST=/app/backend/public \ -e FRONTEND_DIST=/app/backend/public \
-e NODE_ENV=production \ -e NODE_ENV=production \
-v /vol3/1000/HD3/docker/flypic/config:/root/.flypic \ -v /vol3/1000/HD3/docker/flypic/config:/root/.flypic \
-v /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸 \ -v "/vol2/1000/HD2:/vol2/1000/HD2" \
-v "/vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档" \
-v "/vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频" \
jpccr.ccs.tencentyun.com/jinghui/flypic:latest jpccr.ccs.tencentyun.com/jinghui/flypic:latest
``` ```
- 公网镜像 `jpccr.ccs.tencentyun.com/jinghui/flypic:latest`(匿名可拉);内网镜像 `192.168.68.19:3200/jinghui/flypic:latest` - 公网镜像 `jpccr.ccs.tencentyun.com/jinghui/flypic:latest`(匿名可拉);内网镜像 `192.168.68.19:3200/jinghui/flypic:latest`
- 没有镜像就本地构建:`docker build -t flypic:latest .`,替换上面的镜像名 - 没有镜像就本地构建:`docker build -t flypic:latest .`,替换上面的镜像名
- 素材库目录按需增减 `-v`(容器内路径与宿主机一致) - 素材库挂载:推荐整盘 `-v "/数据盘:/数据盘"`(盘下任意子目录直接添加、免改配置),也可只挂需要的子目录 `-v`(容器内路径与宿主机一致)
## 📝 使用注意 ## 📝 使用注意
+169 -25
View File
@@ -136,6 +136,8 @@ router.post(
voice = 'zh-CN-XiaoxiaoNeural', voice = 'zh-CN-XiaoxiaoNeural',
resolution = '1920x1080', resolution = '1920x1080',
extraPrompt = '', extraPrompt = '',
saveDir = '',
duration = 0,
subtitleStyle = {} subtitleStyle = {}
} = req.body || {}; } = req.body || {};
@@ -187,7 +189,7 @@ router.post(
runAiVideo({ runAiVideo({
task, library, images, title: String(title).trim(), url, key, model: mdl, task, library, images, title: String(title).trim(), url, key, model: mdl,
voice, width: Number.isFinite(w) ? w : 1920, height: Number.isFinite(h) ? h : 1080, voice, width: Number.isFinite(w) ? w : 1920, height: Number.isFinite(h) ? h : 1080,
extraPrompt: String(extraPrompt || ''), subtitleStyle: subtitleStyle || {}, extraPrompt: String(extraPrompt || ''), duration: Math.min(600, Math.max(0, Number(duration) || 0)), subtitleStyle: subtitleStyle || {},
req req
}).catch((err) => { }).catch((err) => {
task.status = 'error'; task.status = 'error';
@@ -303,10 +305,24 @@ async function runAiVideo(ctx) {
imagePath: files[i], imagePath: files[i],
subtitle: seg.subtitle || seg.tts || title, subtitle: seg.subtitle || seg.tts || title,
ttsFile, ttsFile,
ttsSeconds: dur,
duration: Math.max(2.5, Math.min(12, dur || 4)) duration: Math.max(2.5, Math.min(12, dur || 4))
}); });
} }
// 目标时长:按各段自然时长比例分配(该路径无转场重叠)
const targetDur = Number(ctx.duration) > 0 ? Number(ctx.duration) : 0;
if (targetDur > 0 && segments.length) {
const avail = Math.max(segments.length * 1.0, targetDur);
const natural = segments.reduce((s, x) => s + x.duration, 0) || 1;
for (const s of segments) {
const d = Math.max(1.0, (s.duration / natural) * avail);
s.duration = d;
s.audioDuration = d;
}
logger.info(`⏱ AI 视频目标时长 ${targetDur}s → 分配 ${segments.length} 段`);
}
// 4) 逐段合成 // 4) 逐段合成
const segFiles = []; const segFiles = [];
for (let i = 0; i < segments.length; i++) { for (let i = 0; i < segments.length; i++) {
@@ -414,6 +430,84 @@ router.post(
}) })
); );
// ---------- 按标题快速生成文案(可编辑,生成视频时严格按此文案分镜) ----------
/** 把整段文案切成逐句分镜:按行优先,长行再按句读符号切 */
function splitCopyToScenes(text) {
const raw = String(text || '').replace(/\r/g, '').split('\n').map((s) => s.trim()).filter(Boolean);
const out = [];
for (let line of raw) {
line = line.replace(/^\d+\s*[.、))]\s*/, ''); // 去掉序号
if (!line) continue;
if (line.length <= 45) { out.push(line); continue; }
const parts = line.split(/(?<=[。!?!?;;])/).map((s) => s.trim()).filter(Boolean);
if (parts.length > 1) out.push(...parts);
else out.push(line);
}
return out.slice(0, 40).map((s) => ({
subtitle: s.slice(0, 40),
tts: s.slice(0, 120)
}));
}
router.post(
'/gen-script',
asyncHandler(async (req, res) => {
const { title, duration = 0, count = 0 } = req.body || {};
const t = String(title || '').trim();
if (!t) throw new ValidationError('请填写视频标题');
const settings = getSettings();
const gen = resolveVideoGen(settings);
const url = String(gen.url || '').replace(/\/+$/, '');
const key = gen.apiKey || process.env.NEWAPI_KEY || '';
const model = gen.model || 'mimo-v2.6-flash';
if (!url) throw new ValidationError('AI 视频未配置:请在右上角「设置 → AI 视频」里填写 Base URL');
if (!key) throw new ValidationError('AI 视频未配置 API Key:请在右上角「设置 → AI 视频」里填写');
const targetSec = Math.min(600, Math.max(0, Number(duration) || 0));
const lineCount = Number(count) > 0
? Math.min(30, Number(count))
: (targetSec ? Math.min(30, Math.max(2, Math.ceil(targetSec / 5))) : 6);
const sys = '你是短视频编导。根据标题写出可直接朗读的短视频旁白文案。要求口语化、有画面感、避免空话。';
const user = [
`标题:${t}`,
`共 ${lineCount} 个画面,每行对应一个画面的旁白。`,
targetSec ? `视频总时长约 ${targetSec} 秒,文案总字数控制在 ${Math.round(targetSec * 3.5)} 字左右。` : '',
'严格只输出文案本身:每行一句,不要编号、不要引号、不要小标题、不要代码块标记;每行不超过 40 个字。'
].filter(Boolean).join('\n');
const resp = await fetch(`${url}/chat/completions`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: 'Bearer' + ' ' + key },
body: JSON.stringify({
model,
messages: [
{ role: 'system', content: sys },
{ role: 'user', content: user }
],
temperature: 0.7,
max_tokens: 2000
}),
signal: AbortSignal.timeout(60 * 1000)
});
if (!resp.ok) {
let msg = `模型接口错误 (${resp.status})`;
try { const j = await resp.json(); msg = (j.error && j.error.message) || j.message || msg; } catch (_) { /* 非 JSON */ }
throw new Error(msg);
}
const data = await resp.json();
const raw = data.choices && data.choices[0] && data.choices[0].message && data.choices[0].message.content;
if (!raw) throw new Error('模型未返回内容');
const script = String(raw)
.replace(/^```[a-z]*\s*/i, '').replace(/```\s*$/, '')
.split('\n').map((s) => s.trim().replace(/^\d+\s*[.、))]\s*/, '')).filter(Boolean)
.slice(0, 40).join('\n');
if (!script) throw new Error('模型未返回文案');
res.json({ success: true, script });
})
);
// ---------- 文本源 AI 生成视频(提示词/URL/文档) ---------- // ---------- 文本源 AI 生成视频(提示词/URL/文档) ----------
const textTasks = new Map(); const textTasks = new Map();
let textTaskSeq = 0; let textTaskSeq = 0;
@@ -426,6 +520,9 @@ router.post(
voice = 'zh-CN-XiaoxiaoNeural', voice = 'zh-CN-XiaoxiaoNeural',
resolution = '1920x1080', resolution = '1920x1080',
extraPrompt = '', extraPrompt = '',
saveDir = '',
transition = 'fade',
duration = 0,
subtitleStyle = {} subtitleStyle = {}
} = req.body || {}; } = req.body || {};
if (!libraryId) throw new ValidationError('缺少 libraryId'); if (!libraryId) throw new ValidationError('缺少 libraryId');
@@ -447,59 +544,85 @@ router.post(
if (!url) throw new ValidationError('未配置模型接口地址(请到右上角设置 → AI 视频里填写)'); if (!url) throw new ValidationError('未配置模型接口地址(请到右上角设置 → AI 视频里填写)');
if (!key) throw new ValidationError('请先在右上角设置 → AI 视频里填写模型 KEY'); if (!key) throw new ValidationError('请先在右上角设置 → AI 视频里填写模型 KEY');
// 转场效果白名单(防注入 ffmpeg filter)
const TRANSITIONS = new Set(['cut','fade','fadeblack','fadewhite','slideleft','slideright','slideup','slidedown','circlecrop','circleopen','circleclose','dissolve','smoothleft','smoothright','wipeleft','wiperight','pixelize','radial','hblur']);
const trans = TRANSITIONS.has(String(transition)) ? String(transition) : 'fade';
const id = `vt${++textTaskSeq}_${Date.now()}`; const id = `vt${++textTaskSeq}_${Date.now()}`;
const [w, h] = String(resolution).split('x').map((n) => parseInt(n, 10)); const [w, h] = String(resolution).split('x').map((n) => parseInt(n, 10));
const task = { id, status: 'running', step: 'script', stepLabel: '正在生成', progress: 0, error: '', resultPath: '', createdAt: Date.now() }; const task = { id, status: 'running', step: 'script', stepLabel: '正在生成', progress: 0, error: '', resultPath: '', createdAt: Date.now() };
textTasks.set(id, task); textTasks.set(id, task);
setTimeout(() => textTasks.delete(id), 30 * 60 * 1000); setTimeout(() => textTasks.delete(id), 30 * 60 * 1000);
runTextVideo({ task, library, title: String(title).trim(), content: text, images, url, key, model: mdl, voice, width: Number.isFinite(w)?w:1920, height: Number.isFinite(h)?h:1080, extraPrompt: String(extraPrompt||''), subtitleStyle: subtitleStyle||{}, req }).catch((err) => { const durSec = Math.min(600, Math.max(0, Number(duration) || 0)); // 目标时长(秒),0=自动
const userScript = String(req.body.script || '').trim().slice(0, 8000); // 用户已编辑的文案:原样分镜,不改写
runTextVideo({ task, library, title: String(title).trim(), content: text, script: userScript, images, url, key, model: mdl, voice, width: Number.isFinite(w)?w:1920, height: Number.isFinite(h)?h:1080, extraPrompt: String(extraPrompt||''), saveDir: String(saveDir||''), transition: trans, duration: durSec, subtitleStyle: subtitleStyle||{}, req }).catch((err) => {
task.status = 'error'; task.error = err.message || String(err); task.status = 'error'; task.error = err.message || String(err);
}); });
res.json({ success: true, taskId: id }); res.json({ success: true, taskId: id });
}) })
); );
async function runTextVideo(ctx) { async function runTextVideo(ctx) {
const { task, library, title, content, images, url, key, model, voice, width, height, extraPrompt, subtitleStyle, req } = ctx; const { task, library, title, content, images, url, key, model, voice, width, height, extraPrompt, saveDir, transition, subtitleStyle, req } = ctx;
const work = fs.mkdtempSync(path.join(os.tmpdir(), 'flypic-tv-')); const work = fs.mkdtempSync(path.join(os.tmpdir(), 'flypic-tv-'));
try { try {
// 生成背景图(若无图片) // 生成背景图(若无图片)
let bgPath = ''; // 解析全部选中图片(本地库路径 / 远程 URL 下载)—— 让每张选中图片都进视频
const imagePaths = [];
if (Array.isArray(images) && images.length) { if (Array.isArray(images) && images.length) {
// 用第一张图作为背景 for (const it of images) {
const rel = typeof images[0] === 'string' ? images[0] : images[0].path || images[0].url; const rel = typeof it === 'string' ? it : (it && (it.path || it.url)) || '';
if (rel && fs.existsSync(path.join(library.path, rel))) bgPath = path.join(library.path, rel); if (!rel) continue;
else if (rel && /^https?:/i.test(rel)) { if (/^https?:/i.test(rel)) {
// 下载 try {
try { const r = await fetch(rel);
const r = await fetch(rel); const buf = Buffer.from(await r.arrayBuffer()); const buf = Buffer.from(await r.arrayBuffer());
bgPath = path.join(work, 'bg.jpg'); fs.writeFileSync(bgPath, buf); const ext = (path.extname(new URL(rel).pathname) || '.jpg').toLowerCase();
} catch (_) {} const fp = path.join(work, `img${imagePaths.length}${ext}`);
fs.writeFileSync(fp, buf);
imagePaths.push(fp);
} catch (e) { logger.warn('图片下载失败: ' + e.message); }
} else {
const abs = path.join(library.path, rel);
if (fs.existsSync(abs)) imagePaths.push(abs);
}
} }
} }
if (!bgPath) { // 兜底:无图时生成纯色背景
bgPath = path.join(work, 'bg.png'); if (!imagePaths.length) {
const bgPath = path.join(work, 'bg.png');
await videotool.run('ffmpeg', ['-y', '-f', 'lavfi', '-i', `color=c=0x1a1a2e:s=${width}x${height}`, '-frames:v', '1', bgPath], { timeoutMs: 60000 }); await videotool.run('ffmpeg', ['-y', '-f', 'lavfi', '-i', `color=c=0x1a1a2e:s=${width}x${height}`, '-frames:v', '1', bgPath], { timeoutMs: 60000 });
imagePaths.push(bgPath);
} }
// LLM 生成分镜:基于内容切分 // LLM 生成分镜:基于内容切分
task.step = 'script'; task.stepLabel = '正在生成脚本'; task.progress = 5; task.step = 'script'; task.stepLabel = '正在生成脚本'; task.progress = 5;
let script = []; let script = [];
if (content) { const targetDur0 = Number(ctx.duration) > 0 ? Number(ctx.duration) : 0;
const userScript = String(ctx.script || '').trim();
if (userScript) {
// 用户已编辑的文案:原样按行切分成镜,绝不改写
script = splitCopyToScenes(userScript);
logger.info(`📝 使用用户文案直通分镜 ${script.length} 段(不改写)`);
} else if (content) {
// 让模型按内容生成 N 段(N = min(8, 句子数)) // 让模型按内容生成 N 段(N = min(8, 句子数))
const sentences = content.split(/[。!?.!?]/).map(s=>s.trim()).filter(Boolean); const sentences = content.split(/[。!?.!?]/).map(s=>s.trim()).filter(Boolean);
const n = Math.min(8, Math.max(2, sentences.length)); const baseN = Math.min(8, Math.max(2, sentences.length));
let n = Math.max(baseN, imagePaths.length); // 分镜数 ≥ 选中图片数,保证每张图都出现
if (targetDur0 > 0) n = Math.max(n, Math.min(30, Math.ceil(targetDur0 / 5))); // 时长越长分镜越多(约5s/段)
script = await llmScript({ url, key, model, title, count: n, extraPrompt: (extraPrompt + ' 内容:' + content.slice(0, 1500)).trim() }); script = await llmScript({ url, key, model, title, count: n, extraPrompt: (extraPrompt + ' 内容:' + content.slice(0, 1500)).trim() });
} else { } else {
script = [{ subtitle: title, tts: title }]; script = [{ subtitle: title, tts: title }];
} }
if (!Array.isArray(script) || !script.length) script = [{ subtitle: title, tts: title }]; if (!Array.isArray(script) || !script.length) script = [{ subtitle: title, tts: title }];
// TTS + segments // TTS + segments:每段轮换使用选中图片,保证所有图片都出现
const segments = []; const segments = [];
for (let i = 0; i < script.length; i++) { let segCount = Math.max(script.length, imagePaths.length);
task.step = 'tts'; task.stepLabel = `正在朗读 ${i+1}/${script.length}`; task.progress = 10 + Math.round((i/script.length)*40); if (targetDur0 > 0 && !userScript) segCount = Math.max(segCount, Math.min(30, Math.ceil(targetDur0 / 5))); // 时长越长分镜越多(仅自动文案时)
const seg = script[i]; for (let i = 0; i < segCount; i++) {
task.step = 'tts'; task.stepLabel = `正在朗读 ${i+1}/${segCount}`; task.progress = 10 + Math.round((i/segCount)*40);
const seg = userScript ? (script[i] || {}) : (script[i % script.length] || {}); // 用户文案不循环重复朗读
let ttsFile = ''; let dur = 0; let ttsFile = ''; let dur = 0;
if (seg.tts) { if (seg.tts) {
try { try {
@@ -507,7 +630,24 @@ async function runTextVideo(ctx) {
ttsFile = t.file; dur = t.seconds; ttsFile = t.file; dur = t.seconds;
} catch (e) { logger.warn('TTS fail: ' + e.message); } } catch (e) { logger.warn('TTS fail: ' + e.message); }
} }
segments.push({ imagePath: bgPath, subtitle: seg.subtitle || seg.tts || title, ttsFile, duration: Math.max(2.5, Math.min(12, dur || 4)) }); segments.push({ imagePath: imagePaths[i % imagePaths.length], subtitle: seg.subtitle || seg.tts || (userScript ? '' : title), ttsFile, ttsSeconds: dur, duration: Math.max(2.5, Math.min(12, dur || 4)) });
}
// 目标时长:画面段总长 = 目标 + 转场重叠(xfade 每次吃掉 0.6s),
// 配音段总长 = 目标(音频走 concat 无重叠),使音画总长都精确等于目标时长
const targetDur = Number(ctx.duration) > 0 ? Number(ctx.duration) : 0;
if (targetDur > 0 && segments.length) {
const n = segments.length;
const overlap = (transition && transition !== 'cut' && n > 1) ? 0.6 * (n - 1) : 0;
const natural = segments.reduce((s, x) => s + x.duration, 0) || 1;
const videoTotal = targetDur + overlap; // 画面段之和
const audioShare = overlap / n; // 每段配音比画面短的秒数(落在转场区)
for (const s of segments) {
const d = Math.max(1.0, (s.duration / natural) * videoTotal);
s.duration = d;
s.audioDuration = Math.max(0.5, d - audioShare); // 精确模式:配音对齐
}
logger.info(`⏱ AI 视频目标时长 ${targetDur}s → 画面 ${videoTotal.toFixed(1)}s + 转场重叠 ${overlap.toFixed(1)}s,分 ${n} 段`);
} }
// compose // compose
@@ -520,12 +660,16 @@ async function runTextVideo(ctx) {
} }
task.step = 'merge'; task.stepLabel = '合并'; task.progress = 96; task.step = 'merge'; task.stepLabel = '合并'; task.progress = 96;
const finalTmp = path.join(work, 'final.mp4'); const finalTmp = path.join(work, 'final.mp4');
await videotool.concatSegments(segFiles, finalTmp); await videotool.concatWithTransition(segFiles, finalTmp, { transition: transition || 'fade', width, height });
// 6) 落库:保存到用户选择的目录(默认素材库根目录)
const safeDir = String(saveDir || '').replace(/^\/+/, '').replace(/\.\./g, '');
const baseDir = safeDir ? path.join(library.path, safeDir) : library.path;
try { fs.mkdirSync(baseDir, { recursive: true }); } catch (_) {}
const safeTitle = String(title).replace(/[\\/:*?"<>|]/g, '_').slice(0, 60) || 'AI视频'; const safeTitle = String(title).replace(/[\\/:*?"<>|]/g, '_').slice(0, 60) || 'AI视频';
let target = path.join(library.path, `${safeTitle}.mp4`); let target = path.join(baseDir, `${safeTitle}.mp4`);
let n = 1; let n = 1;
while (fs.existsSync(target)) { target = path.join(library.path, `${safeTitle}_${n}.mp4`); n++; } while (fs.existsSync(target)) { target = path.join(baseDir, `${safeTitle}_${n}.mp4`); n++; }
fs.copyFileSync(finalTmp, target); fs.copyFileSync(finalTmp, target);
await reindex(req, library.path, target); await reindex(req, library.path, target);
+1 -1
View File
@@ -16,7 +16,7 @@ const { getSettings } = require('./settings');
const HUB_URL = (process.env.HUB_URL || 'https://auth.88531.cn/api').replace(/\/+$/, ''); const HUB_URL = (process.env.HUB_URL || 'https://auth.88531.cn/api').replace(/\/+$/, '');
const HUB_PROJECT_ID = process.env.HUB_PROJECT_ID || ''; const HUB_PROJECT_ID = process.env.HUB_PROJECT_ID || '';
const HUB_API_KEY = process.env.HUB_API_KEY || ''; const HUB_API_KEY = process.env.HUB_API_KEY || '';
const SITE_VERSION = process.env.SITE_VERSION || '1.4.12'; const SITE_VERSION = process.env.SITE_VERSION || '1.4.15';
const TIMEOUT_MS = 8000; const TIMEOUT_MS = 8000;
const state = { const state = {
+10 -7
View File
@@ -33,12 +33,13 @@ const DEFAULTS = {
} }
}, },
// AI 视频:一句话/文本/网页/文档 → 带字幕配音的成片 // AI 视频:一句话/文本/网页/文档 → 带字幕配音的成片
// provider='inherit' 复用上面的 AI 生图配置;'custom' 用下面自定义的文本模型 // provider='custom' 用下面的文本模型(默认指向 ai.88531.cn,免费注册领额度);
// 'inherit' 复用上面的 AI 生图配置
videoai: { videoai: {
provider: 'inherit', provider: 'custom',
custom: { custom: {
url: '', url: 'https://ai.88531.cn/v1',
model: '', model: 'mimo-v2.6-flash',
apiKey: '' apiKey: ''
} }
} }
@@ -78,10 +79,12 @@ function getSettings() {
} }
}, },
videoai: { videoai: {
provider: (data.videoai && data.videoai.provider) === 'custom' ? 'custom' : 'inherit', provider: data.videoai
? (data.videoai.provider === 'inherit' ? 'inherit' : 'custom')
: DEFAULTS.videoai.provider,
custom: { custom: {
url: (data.videoai && data.videoai.custom && data.videoai.custom.url) || '', url: (data.videoai && data.videoai.custom && data.videoai.custom.url) || DEFAULTS.videoai.custom.url,
model: (data.videoai && data.videoai.custom && data.videoai.custom.model) || '', model: (data.videoai && data.videoai.custom && data.videoai.custom.model) || DEFAULTS.videoai.custom.model,
apiKey: (data.videoai && data.videoai.custom && data.videoai.custom.apiKey) || '' apiKey: (data.videoai && data.videoai.custom && data.videoai.custom.apiKey) || ''
} }
} }
+70 -2
View File
@@ -382,10 +382,26 @@ async function buildSegment(seg, outPath, { width = 1920, height = 1080, fontSiz
`drawtext=fontfile=/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc:textfile=${textFile}:fontsize=${fontSize}:fontcolor=${color}@0.95:borderw=2:bordercolor=black@0.6:x=${xExpr}:y=${yExpr}:line_spacing=8` `drawtext=fontfile=/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc:textfile=${textFile}:fontsize=${fontSize}:fontcolor=${color}@0.95:borderw=2:bordercolor=black@0.6:x=${xExpr}:y=${yExpr}:line_spacing=8`
].join(','); ].join(',');
const exact = seg.audioDuration != null; // 目标时长模式:画面用 duration,配音对齐 audioDuration
const vDur = Math.max(0.5, Number(seg.duration) || 4);
const args = [ const args = [
'-y', '-loop', '1', '-t', seg.duration.toFixed(3), '-i', seg.imagePath '-y', '-loop', '1', '-t', vDur.toFixed(3), '-i', seg.imagePath
]; ];
if (seg.ttsFile) { if (exact) {
const aDur = Math.max(0.5, Number(seg.audioDuration) || vDur);
const ttsDur = Number(seg.ttsSeconds) || 0;
let chain = '';
if (seg.ttsFile && ttsDur > aDur + 0.05) {
const f = Math.min(4.0, ttsDur / aDur); // 配音超长则加速(最多4倍),避免截断内容
chain += `atempo=${f.toFixed(4)},`;
}
chain += `atrim=0:${aDur.toFixed(3)},apad=whole_dur=${aDur.toFixed(3)}`;
const src = seg.ttsFile
? ['-i', seg.ttsFile]
: ['-f', 'lavfi', '-i', 'anullsrc=channel_layout=stereo:sample_rate=44100'];
args.push(...src, '-filter_complex', `[1:a]${chain}[a]`,
'-map', '0:v', '-map', '[a]', '-c:a', 'aac', '-ar', '44100', '-ac', '2');
} else if (seg.ttsFile) {
args.push('-i', seg.ttsFile, '-map', '0:v', '-map', '1:a', '-c:a', 'aac', '-ar', '44100', '-ac', '2', '-shortest'); args.push('-i', seg.ttsFile, '-map', '0:v', '-map', '1:a', '-c:a', 'aac', '-ar', '44100', '-ac', '2', '-shortest');
} else { } else {
args.push('-f', 'lavfi', '-i', 'anullsrc=channel_layout=stereo:sample_rate=44100', '-map', '0:v', '-map', '1:a', '-shortest'); args.push('-f', 'lavfi', '-i', 'anullsrc=channel_layout=stereo:sample_rate=44100', '-map', '0:v', '-map', '1:a', '-shortest');
@@ -424,6 +440,57 @@ async function concatSegments(segFiles, outPath) {
} }
} }
/**
* 带转场拼接分段 mp4(xfade 交叉过渡 + 音频直拼)
* transition: cut/fade/slideleft/slideright/circleopen/dissolve/wipeleft/... (ffmpeg xfade 名)
* 失败时回退为普通硬拼接
*/
async function concatWithTransition(segFiles, outPath, { transition = 'fade', width = 1920, height = 1080 } = {}) {
const n = segFiles.length;
if (n <= 1 || !transition || transition === 'cut') return concatSegments(segFiles, outPath);
const F = 0.6; // 转场时长(秒)
const dir = tmpDir();
try {
// 探测每段真实时长,用于计算 xfade offset
const durs = [];
for (const f of segFiles) {
const p = await probeVideo(f);
durs.push(p.duration > 0.2 ? p.duration : 4);
}
const inputs = [];
for (const f of segFiles) inputs.push('-i', f);
const filters = [];
for (let i = 0; i < n; i++) {
filters.push(`[${i}:v]scale=${width}:${height}:force_original_aspect_ratio=decrease,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2,setsar=1,format=yuv420p,fps=30[v${i}]`);
}
let prev = 'v0';
let acc = durs[0];
for (let i = 1; i < n; i++) {
const offset = Math.max(0, acc - F);
const out = i === n - 1 ? 'vx' : `x${i}`;
filters.push(`[${prev}][v${i}]xfade=transition=${transition}:duration=${F}:offset=${offset.toFixed(3)}[${out}]`);
prev = out;
acc = acc + durs[i] - F;
}
const audioInputs = segFiles.map((_, i) => `[${i}:a]`).join('');
filters.push(`${audioInputs}concat=n=${n}:v=0:a=1[aout]`);
const args = [
'-y', ...inputs, '-filter_complex', filters.join(';'),
'-map', '[vx]', '-map', '[aout]',
'-c:v', 'libx264', '-preset', 'veryfast', '-crf', '20',
'-pix_fmt', 'yuv420p', '-movflags', '+faststart', outPath
];
await run(FFMPEG, args, { timeoutMs: 600 * 1000 });
return outPath;
} catch (err) {
// 转场失败回退硬拼接,保证出片
logger.warn && logger.warn(`⚠️ 转场拼接失败,回退硬拼接: ${err.message}`);
return concatSegments(segFiles, outPath);
} finally {
fs.rmSync(dir, { recursive: true, force: true });
}
}
module.exports = { module.exports = {
run, run,
probeVideo, probeVideo,
@@ -434,5 +501,6 @@ module.exports = {
generateTts, generateTts,
buildSegment, buildSegment,
concatSegments, concatSegments,
concatWithTransition,
textToSrt textToSrt
}; };
+3 -5
View File
@@ -10,10 +10,8 @@ services:
ports: ports:
- "15002:15002" - "15002:15002"
volumes: volumes:
# 素材库目录(容器内路径与飞牛一致,直接填实际路径即可) # 数据盘整盘挂载(容器内路径与飞牛一致):/vol2/1000/HD2 下任意子目录(含以后新建的)可直接添加为素材库,无需改配置
- /vol2/1000/HD2/壁纸:/vol2/1000/HD2/壁纸 - /vol2/1000/HD2:/vol2/1000/HD2
- /vol2/1000/HD2/我的文档:/vol2/1000/HD2/我的文档
- /vol2/1000/HD2/发布到平台的图片和视频:/vol2/1000/HD2/发布到平台的图片和视频
# 持久化配置(config.json 存储素材库路径、密码等,不用改) # 持久化配置(config.json 存储素材库路径、密码等,不用改)
- /vol3/1000/HD3/docker/flypic/config:/root/.flypic - /vol3/1000/HD3/docker/flypic/config:/root/.flypic
environment: environment:
@@ -28,7 +26,7 @@ services:
- HUB_API_KEY=${HUB_API_KEY:-} - HUB_API_KEY=${HUB_API_KEY:-}
- NEWAPI_KEY=${NEWAPI_KEY:-} - NEWAPI_KEY=${NEWAPI_KEY:-}
# 当前站点版本(与 frontend/package.json、CHANGELOG 保持一致,界面版本徽标来源) # 当前站点版本(与 frontend/package.json、CHANGELOG 保持一致,界面版本徽标来源)
- SITE_VERSION=1.4.12 - SITE_VERSION=1.4.21
# 让容器经 host.docker.internal 访问宿主机的 AI 侧车 # 让容器经 host.docker.internal 访问宿主机的 AI 侧车
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "flypic-frontend", "name": "flypic-frontend",
"version": "1.4.0", "version": "1.4.21",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+5 -2
View File
@@ -50,7 +50,8 @@ export async function getCacheMeta(libraryId) {
* 使用分片结构,不再需要 size 参数 * 使用分片结构,不再需要 size 参数
*/ */
export function getThumbnailUrl(libraryId, filename, version) { export function getThumbnailUrl(libraryId, filename, version) {
const base = `/api/image/thumbnail/${libraryId}/${filename}`; const encoded = encodeURIComponent(filename);
const base = `/api/image/thumbnail/${libraryId}/${encoded}`;
// version=文件 modified_at,编辑保存后变化以穿透浏览器缓存 // version=文件 modified_at,编辑保存后变化以穿透浏览器缓存
return version ? `${base}?v=${version}` : base; return version ? `${base}?v=${version}` : base;
} }
@@ -59,7 +60,9 @@ export function getThumbnailUrl(libraryId, filename, version) {
* 获取原图 URL * 获取原图 URL
*/ */
export function getOriginalUrl(libraryId, path) { export function getOriginalUrl(libraryId, path) {
return `/api/image/original/${libraryId}/${path}`; // 按 '/' 分段编码,避免中文/空格/#/? 等字符导致原图 URL 404(灯箱/新窗口打开失败)
const encoded = String(path).split('/').map(encodeURIComponent).join('/');
return `/api/image/original/${libraryId}/${encoded}`;
} }
/** /**
+111 -5
View File
@@ -60,6 +60,12 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
const [keyword, setKeyword] = useState(''); const [keyword, setKeyword] = useState('');
const [picked, setPicked] = useState([]); const [picked, setPicked] = useState([]);
const [taskId, setTaskId] = useState(''); const [taskId, setTaskId] = useState('');
const [folders, setFolders] = useState([]);
const [saveDir, setSaveDir] = useState('');
const [transition, setTransition] = useState('fade');
const [duration, setDuration] = useState(0); // 目标时长(秒),0=自动按配音
const [script, setScript] = useState(''); // 视频文案(可编辑,逐句朗读)
const [genScript, setGenScript] = useState(false);
const [task, setTask] = useState(null); const [task, setTask] = useState(null);
const [error, setError] = useState(''); const [error, setError] = useState('');
const [starting, setStarting] = useState(false); const [starting, setStarting] = useState(false);
@@ -92,6 +98,26 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
useEffect(() => { if (libraryId) loadImages(''); }, [libraryId]); useEffect(() => { if (libraryId) loadImages(''); }, [libraryId]);
const flattenFolders = (nodes, acc = []) => {
for (const n of (nodes || [])) {
if (n && n.path) acc.push(n.path);
if (n && n.children) flattenFolders(n.children, acc);
}
return acc;
};
useEffect(() => {
if (!libraryId) return;
(async () => {
try {
const r = await fetch(`/api/image/folders?libraryId=${libraryId}`, { headers: auth });
const d = await r.json();
const tree = (d && d.data && d.data.folders) || [];
setFolders(flattenFolders(tree));
} catch (_) { setFolders([]); }
})();
}, [libraryId]);
const togglePick = (img) => { const togglePick = (img) => {
setPicked((list) => { setPicked((list) => {
const i = list.findIndex((x) => x.path === img.path); const i = list.findIndex((x) => x.path === img.path);
@@ -109,7 +135,6 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
setTask(d); setTask(d);
if (d.status === 'done' || d.status === 'error') { if (d.status === 'done' || d.status === 'error') {
clearInterval(iv); clearInterval(iv);
if (d.status === 'done') setTimeout(() => { onDone && onDone(d.resultPath); onClose(); }, 1200);
} }
} catch (_) {} } catch (_) {}
}, 1500); }, 1500);
@@ -144,6 +169,23 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
finally { setExtracting(false); } finally { setExtracting(false); }
}; };
const handleGenScript = async () => {
if (!title.trim()) { setError('请填写视频标题'); return; }
setError(''); setGenScript(true);
try {
const r = await fetch('/api/video/gen-script', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: 'Bearer' + ' ' + getToken() },
body: JSON.stringify({ title: title.trim(), duration: Number(duration) || 0, count: picked.length || 0 })
});
const d = await r.json().catch(() => ({}));
if (!r.ok || d.error) throw new Error(errText(d.error, `文案生成失败 (${r.status})`));
if (!d.script) throw new Error('模型未返回文案');
setScript(d.script);
} catch (e) { setError(e.message || '文案生成失败'); }
finally { setGenScript(false); }
};
const handleStart = async () => { const handleStart = async () => {
setError(''); setError('');
if (!title.trim()) { setError('请填写视频标题'); return; } if (!title.trim()) { setError('请填写视频标题'); return; }
@@ -156,8 +198,9 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
const body = { const body = {
libraryId, title: title.trim(), libraryId, title: title.trim(),
content: content.trim(), content: content.trim(),
script: script.trim(), // 用户已编辑的文案:非空时原样分镜(不改写)
images: imgs, images: imgs,
voice, resolution, extraPrompt: '', voice, resolution, extraPrompt: '', saveDir, transition, duration: Number(duration) || 0,
subtitleStyle: { position: subtitlePos, color: subtitleColor, fontSizePct: subtitleSize } subtitleStyle: { position: subtitlePos, color: subtitleColor, fontSizePct: subtitleSize }
}; };
const r = await fetch('/api/video/aigenerate-text', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${getToken()}` }, body: JSON.stringify(body) }); const r = await fetch('/api/video/aigenerate-text', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${getToken()}` }, body: JSON.stringify(body) });
@@ -314,7 +357,23 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
<div> <div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">视频标题</label> <label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">视频标题</label>
<input className={input} value={title} onChange={(e) => setTitle(e.target.value)} placeholder="例如:产品速览 / 探店 vlog" maxLength={60} disabled={running||done} /> <div className="flex gap-2">
<input className={input + ' flex-1'} value={title} onChange={(e) => setTitle(e.target.value)} placeholder="输入标题后点右侧按钮快速生成文案" maxLength={60} disabled={running||done} />
<button onClick={handleGenScript} disabled={genScript || running || done || !title.trim()}
title="按标题快速生成文案,生成后可修改,视频严格按此文案朗读"
className="shrink-0 px-3 py-1.5 text-xs rounded bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 whitespace-nowrap">
{genScript ? '文案生成中…' : 'AI 生成文案'}
</button>
</div>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">视频文案(可修改,逐句朗读)</label>
<textarea className={input + ' font-mono'} rows={6} value={script} onChange={(e) => setScript(e.target.value)} disabled={running||done}
placeholder={'点上方「AI 生成文案」按标题生成;也可直接粘贴已有文案。\n每行一句 = 一个画面,视频严格按此文案配音。\n留空则由 AI 按下方提示词/内容自动生成。'} />
<div className="text-[11px] text-gray-500 dark:text-gray-400 mt-1">
{script.trim() ? `已填 ${script.trim().split(/\n+/).length} 句 · 按你的文案生成(不改写)` : '留空 = AI 自动分镜'}
</div>
</div> </div>
<div className="grid grid-cols-2 gap-3"> <div className="grid grid-cols-2 gap-3">
@@ -351,6 +410,53 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
</div> </div>
</div> </div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">保存到目录</label>
<select className={input} value={saveDir} onChange={(e) => setSaveDir(e.target.value)} disabled={running||done}>
<option value="">素材库根目录</option>
{folders.map((p) => <option key={p} value={p}>{p}</option>)}
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">视频时长</label>
<div className="flex flex-wrap gap-1.5 mb-1.5">
{[0, 15, 30, 45, 60, 90, 120, 180, 300].map((s) => (
<button key={s} type="button" disabled={running||done}
onClick={() => setDuration(s)}
className={`px-2 py-1 rounded text-xs border transition ${Number(duration)===s ? 'bg-blue-500 border-blue-500 text-white' : 'bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:border-blue-400'}`}>
{s === 0 ? '自动' : s < 60 ? `${s}秒` : `${s/60}分钟`}
</button>
))}
</div>
<div className="flex items-center gap-2">
<input type="number" min="0" max="600" step="5" disabled={running||done}
className={input} value={duration || ''} placeholder="自动(按配音)"
onChange={(e) => setDuration(Math.min(600, Math.max(0, Number(e.target.value) || 0)))} />
<span className="text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap">秒 · 0=自动</span>
</div>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">转场效果</label>
<select className={input} value={transition} onChange={(e) => setTransition(e.target.value)} disabled={running||done}>
<option value="cut">无转场(直接切换)</option>
<option value="fade">淡入淡出</option>
<option value="fadeblack">黑场淡入</option>
<option value="fadewhite">白场淡入</option>
<option value="slideleft">左滑</option>
<option value="slideright">右滑</option>
<option value="slideup">上滑</option>
<option value="slidedown">下滑</option>
<option value="dissolve">溶解</option>
<option value="wipeleft">左擦除</option>
<option value="wiperight">右擦除</option>
<option value="pixelize">像素化</option>
<option value="circleopen">圆圈打开</option>
<option value="hblur">模糊过渡</option>
</select>
</div>
<div className="flex items-start gap-2 rounded-lg bg-gray-50 dark:bg-gray-900/50 border border-gray-200 dark:border-gray-700 px-3 py-2 text-xs text-gray-600 dark:text-gray-400"> <div className="flex items-start gap-2 rounded-lg bg-gray-50 dark:bg-gray-900/50 border border-gray-200 dark:border-gray-700 px-3 py-2 text-xs text-gray-600 dark:text-gray-400">
<Settings className="w-3.5 h-3.5 mt-0.5 flex-shrink-0" /> <Settings className="w-3.5 h-3.5 mt-0.5 flex-shrink-0" />
<span>提供商 / 模型 / KEY 在右上角「设置 → AI 视频」里配置,普通文本模型即可;配音与字幕由本地合成。</span> <span>提供商 / 模型 / KEY 在右上角「设置 → AI 视频」里配置,普通文本模型即可;配音与字幕由本地合成。</span>
@@ -374,8 +480,8 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
{error && <div className="text-sm text-red-600 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg px-3 py-2">{error}</div>} {error && <div className="text-sm text-red-600 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg px-3 py-2">{error}</div>}
<div className="flex justify-end gap-3 pt-1"> <div className="flex justify-end gap-3 pt-1">
<button onClick={onClose} disabled={running||starting} className="px-4 py-2 text-sm rounded-lg border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50"> <button onClick={() => (done ? (onDone && onDone(task?.resultPath)) : onClose())} disabled={running||starting} className="px-4 py-2 text-sm rounded-lg border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50">
{done ? '关闭' : '取消'} {done ? '关闭并刷新' : '取消'}
</button> </button>
{!running && !done && ( {!running && !done && (
<button onClick={handleStart} disabled={starting} className="px-5 py-2 text-sm rounded-lg bg-purple-600 hover:bg-purple-700 text-white font-medium disabled:opacity-50 flex items-center gap-2"> <button onClick={handleStart} disabled={starting} className="px-5 py-2 text-sm rounded-lg bg-purple-600 hover:bg-purple-700 text-white font-medium disabled:opacity-50 flex items-center gap-2">
+16 -3
View File
@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo, useRef } from 'react'; import { useState, useEffect, useMemo, useRef } from 'react';
import { Sun, Moon, Search, Filter, Sliders, RefreshCw, ScanLine, Star, Bell, Github, Settings, ExternalLink, Wand2, Film } from 'lucide-react'; import { Sun, Moon, Search, Filter, Sliders, RefreshCw, ScanLine, Star, Bell, Github, Settings, ExternalLink, Wand2, Film, Download } from 'lucide-react';
import { useLibraryStore } from '../stores/useLibraryStore'; import { useLibraryStore } from '../stores/useLibraryStore';
import { useImageStore } from '../stores/useImageStore'; import { useImageStore } from '../stores/useImageStore';
import { useUIStore } from '../stores/useUIStore'; import { useUIStore } from '../stores/useUIStore';
@@ -15,6 +15,8 @@ import { createLogger } from '../utils/logger';
const logger = createLogger('Header'); const logger = createLogger('Header');
const REPO_URL = 'https://gitea.88531.cn/jinghui/flypic'; const REPO_URL = 'https://gitea.88531.cn/jinghui/flypic';
// 素材模板下载页(88531 文档站)
const MATERIALS_URL = 'https://doc.88531.cn/docs/mrfx/mrfx-1g99qt7tt49tl';
function Header() { function Header() {
const { currentLibraryId } = useLibraryStore(); const { currentLibraryId } = useLibraryStore();
@@ -40,7 +42,7 @@ const [showAIVideo, setShowAIVideo] = useState(false);
// 授权系统 hub:版本 / 公告 / 在线人数 // 授权系统 hub:版本 / 公告 / 在线人数
const hub = useHub(); const hub = useHub();
const announcements = hub.announcements || []; const announcements = hub.announcements || [];
const appVersion = hub.version ? `v${String(hub.version).replace(/^v/, '')}` : 'v1.4.12'; const appVersion = hub.version ? `v${String(hub.version).replace(/^v/, '')}` : 'v1.4.15';
// 从全局 store 获取筛选状态 // 从全局 store 获取筛选状态
const selectedFormats = filters.formats || []; const selectedFormats = filters.formats || [];
@@ -346,9 +348,20 @@ const [showAIVideo, setShowAIVideo] = useState(false);
); );
const availableRatings = filterOptions.ratings; const availableRatings = filterOptions.ratings;
// 右上角图标组:开源地址 / 通知 / 设置 / 版本号 // 右上角图标组:下载更多素材 / 开源地址 / 通知 / 设置 / 版本号
const rightIcons = ( const rightIcons = (
<> <>
<a
href={MATERIALS_URL}
target="_blank"
rel="noreferrer"
title="下载更多素材"
className="flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-500/15 border border-blue-200 dark:border-blue-500/40 transition-colors flex-shrink-0"
>
<Download className="w-4 h-4" />
<span className="hidden lg:inline text-sm font-medium">下载更多素材</span>
</a>
<a <a
href={REPO_URL} href={REPO_URL}
target="_blank" target="_blank"
+1 -1
View File
@@ -58,7 +58,7 @@ const ImageCell = ({
height: `${image.calculatedHeight}px` height: `${image.calculatedHeight}px`
}} }}
onClick={(e) => onImageClick(image, e, flatIndex)} onClick={(e) => onImageClick(image, e, flatIndex)}
onDoubleClick={() => onImageDoubleClick(image, flatIndex)} onDoubleClick={(e) => { e.preventDefault(); onImageDoubleClick(image, flatIndex); }}
onContextMenu={(e) => onContextMenu(e, image)} onContextMenu={(e) => onContextMenu(e, image)}
draggable={true} draggable={true}
onDragStart={(e) => onDragStart(e, image)} onDragStart={(e) => onDragStart(e, image)}
+20 -4
View File
@@ -5,6 +5,7 @@
import { useState, useMemo, useCallback, useRef } from 'react'; import { useState, useMemo, useCallback, useRef } from 'react';
import { PhotoProvider } from 'react-photo-view'; import { PhotoProvider } from 'react-photo-view';
import PhotoStrip from './PhotoStrip';
import 'react-photo-view/dist/react-photo-view.css'; import 'react-photo-view/dist/react-photo-view.css';
import { VariableSizeList as List } from 'react-window'; import { VariableSizeList as List } from 'react-window';
@@ -197,10 +198,15 @@ function ImageWaterfall() {
return imageAPI.getOriginalUrl(currentLibraryId, image.path); return imageAPI.getOriginalUrl(currentLibraryId, image.path);
}, [currentLibraryId]); }, [currentLibraryId]);
// 灯箱只收图片:视频/文档双击走 FileViewer,不进灯箱列表(底部缩略图条同源,打不开的文件不显示)
const lightboxImages = useMemo(() => {
return filteredImages.filter(img => (img.fileType || 'image') === 'image');
}, [filteredImages]);
// PhotoProvider 图片列表 // PhotoProvider 图片列表
const providerImages = useMemo(() => { const providerImages = useMemo(() => {
return filteredImages.map(img => ({ src: getOriginalUrl(img), key: img.id })); return lightboxImages.map(img => ({ src: getOriginalUrl(img), key: img.id }));
}, [filteredImages, getOriginalUrl]); }, [lightboxImages, getOriginalUrl]);
// 图片点击处理 —— 单击选中,双击放大 // 图片点击处理 —— 单击选中,双击放大
const handleImageClick = useCallback((image, event, imageIndex) => { const handleImageClick = useCallback((image, event, imageIndex) => {
@@ -236,11 +242,13 @@ function ImageWaterfall() {
const handleImageDoubleClick = useCallback((image, flatIndex) => { const handleImageDoubleClick = useCallback((image, flatIndex) => {
const fileType = image.fileType || 'image'; const fileType = image.fileType || 'image';
if (fileType === 'image') { if (fileType === 'image') {
setPhotoIndex(flatIndex); // flatIndex 是全量列表索引,灯箱列表只含图片 → 映射为图片子集索引
const idx = lightboxImages.findIndex(im => im.id === image.id);
setPhotoIndex(idx >= 0 ? idx : 0);
} else { } else {
setViewerFile(image); setViewerFile(image);
} }
}, []); }, [lightboxImages]);
// 文件名双击处理(重命名) // 文件名双击处理(重命名)
const handleFilenameDoubleClick = useCallback((e, image) => { const handleFilenameDoubleClick = useCallback((e, image) => {
@@ -660,6 +668,14 @@ onToggleFavorite={handleToggleFavorite}
)} )}
</PhotoProvider> </PhotoProvider>
{/* 灯箱底部缩略图条:只列图片(与 providerImages 同源对齐),点击跳转查看 */}
<PhotoStrip
images={lightboxImages}
index={photoIndex}
onIndexChange={setPhotoIndex}
getThumbnailUrl={getThumbnailUrl}
/>
{/* 文件查看器 */} {/* 文件查看器 */}
{viewerFile && ( {viewerFile && (
<FileViewer <FileViewer
+152
View File
@@ -0,0 +1,152 @@
/**
* 灯箱底部缩略图条 + 幻灯片播放
* 双击图片放大后,在底部列出当前文件夹(含筛选)下的全部图片,
* 点击任意缩略图直接跳转查看,与 react-photo-view 的 index 一一对应。
* 左侧提供幻灯片播放:▶ 播放 / ⏸ 暂停,间隔可选(1/2/3/5/10 秒,localStorage 记忆)。
*
* 通过 portal 挂到 body:react-photo-view 也是 portal 到 body(z-index 2000),
* 这里用 2100 保证压在其上方,且不被祖先的 transform/filter 形成的层叠上下文困住。
*/
import { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
const INTERVAL_KEY = 'flypic_slideshow_interval';
const INTERVAL_OPTIONS = [1, 2, 3, 5, 10];
export default function PhotoStrip({ images, index, onIndexChange, getThumbnailUrl }) {
const stripRef = useRef(null);
const [playing, setPlaying] = useState(false);
const [intervalSec, setIntervalSec] = useState(() => {
const v = parseFloat(localStorage.getItem(INTERVAL_KEY));
return INTERVAL_OPTIONS.includes(v) ? v : 3;
});
// 缩略图加载失败(后端可能返回 0 字节 webp)→ 退化为格式角标
const [failed, setFailed] = useState({});
const total = images ? images.length : 0;
const changeInterval = (v) => {
setIntervalSec(v);
localStorage.setItem(INTERVAL_KEY, String(v));
};
// 灯箱关闭即停播(组件在 index<0 时仍挂载,只是返回 null)
useEffect(() => {
if (index < 0 && playing) setPlaying(false);
}, [index, playing]);
// 幻灯片:每张停留 intervalSec,到末尾循环回首张;
// 手动跳转(index 变化)会重排计时器,让新图也停留满一个间隔。
useEffect(() => {
if (!playing || index < 0 || total < 2) return undefined;
const t = setTimeout(() => onIndexChange((index + 1) % total), intervalSec * 1000);
return () => clearTimeout(t);
}, [playing, index, intervalSec, total, onIndexChange]);
// 切换图片时把当前缩略图滚到条中间(只滚条自身,不动页面)
useEffect(() => {
if (index < 0 || !stripRef.current) return;
const el = stripRef.current.querySelector('[data-active="true"]');
if (!el) return;
const c = stripRef.current;
c.scrollTo({
left: el.offsetLeft - c.clientWidth / 2 + el.clientWidth / 2,
behavior: 'smooth',
});
}, [index]);
if (index < 0 || !images || !images.length) return null;
return createPortal(
<div className="fixed bottom-0 left-0 right-0 z-[2100] bg-black/85 backdrop-blur-sm border-t border-white/10">
<div className="flex items-center gap-2 px-3 py-2">
{/* 当前进度 */}
<span className="shrink-0 text-[11px] text-gray-300 tabular-nums select-none pr-1 border-r border-white/15 mr-1">
{index + 1} / {total}
</span>
{/* 幻灯片播放:▶/⏸ + 间隔选择 */}
<button
type="button"
title={playing ? '暂停幻灯片播放' : '幻灯片播放'}
aria-label={playing ? '暂停幻灯片' : '播放幻灯片'}
onClick={() => total >= 2 && setPlaying((p) => !p)}
className={`shrink-0 w-7 h-7 rounded-full flex items-center justify-center transition-colors ${
playing
? 'bg-purple-500 text-white hover:bg-purple-400'
: 'bg-white/10 text-gray-200 hover:bg-white/20'
} ${total < 2 ? 'opacity-40 cursor-not-allowed' : ''}`}
>
{playing ? (
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">
<rect x="6" y="4" width="4" height="16" rx="1" />
<rect x="14" y="4" width="4" height="16" rx="1" />
</svg>
) : (
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">
<path d="M7 4.5v15l13-7.5z" />
</svg>
)}
</button>
<select
title="幻灯片切换间隔"
aria-label="幻灯片切换间隔"
value={intervalSec}
onChange={(e) => changeInterval(parseFloat(e.target.value))}
className={`shrink-0 h-7 rounded bg-white/10 text-[11px] text-gray-200 px-1 pr-4 outline-none cursor-pointer hover:bg-white/20 border border-transparent focus:border-purple-400/60 ${
playing ? 'border-purple-400/60' : ''
}`}
>
{INTERVAL_OPTIONS.map((s) => (
<option key={s} value={s} className="bg-gray-900 text-gray-100">
{s} 秒
</option>
))}
</select>
{/* 缩略图横向滚动条 */}
<div
ref={stripRef}
className="flex-1 flex items-center gap-1.5 overflow-x-auto overflow-y-hidden scrollbar-thin"
style={{ scrollbarWidth: 'thin' }}
>
{images.map((img, i) => {
const src = getThumbnailUrl ? getThumbnailUrl(img) : '';
const active = i === index;
const bad = failed[img.id ?? i];
return (
<button
key={img.id ?? i}
type="button"
data-active={active ? 'true' : 'false'}
title={img.filename || ''}
onClick={() => onIndexChange(i)}
className={`relative shrink-0 w-12 h-12 rounded overflow-hidden border-2 transition-all duration-150 ${
active
? 'border-purple-500 ring-2 ring-purple-400/60 scale-105 z-10'
: 'border-transparent opacity-55 hover:opacity-100 hover:border-white/40'
}`}
>
{src && !bad ? (
<img
src={src}
alt={img.filename || ''}
decoding="async"
draggable={false}
onError={() => setFailed((f) => ({ ...f, [img.id ?? i]: true }))}
className="w-full h-full object-cover pointer-events-none"
/>
) : (
<span className="w-full h-full flex items-center justify-center bg-gray-800 text-[9px] text-gray-400">
{(img.format || (img.filename || '').split('.').pop() || '').slice(0, 5)}
</span>
)}
</button>
);
})}
</div>
</div>
</div>,
document.body
);
}
+17 -8
View File
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { X, ScanText, Info, Save, FlaskConical, Github, ExternalLink, Wand2, Film } from 'lucide-react'; import { X, ScanText, Info, Save, FlaskConical, Github, ExternalLink, Wand2, Film } from 'lucide-react';
import { settingsAPI, aigenAPI } from '../api'; import { settingsAPI, aigenAPI } from '../api';
const APP_VERSION = 'v1.4.12'; const APP_VERSION = 'v1.4.21';
const REPO_URL = 'https://gitea.88531.cn/jinghui/flypic'; const REPO_URL = 'https://gitea.88531.cn/jinghui/flypic';
/** /**
@@ -57,10 +57,10 @@ export default function SettingsModal({ open, onClose, versionLabel, initialTab
} }
}); });
setVa({ setVa({
provider: d?.videoai?.provider === 'custom' ? 'custom' : 'inherit', provider: d?.videoai?.provider === 'inherit' ? 'inherit' : 'custom',
custom: { custom: {
url: d?.videoai?.custom?.url || '', url: d?.videoai?.custom?.url || 'https://ai.88531.cn/v1',
model: d?.videoai?.custom?.model || '', model: d?.videoai?.custom?.model || 'mimo-v2.6-flash',
apiKeyMasked: d?.videoai?.custom?.apiKeyMasked || '', apiKeyMasked: d?.videoai?.custom?.apiKeyMasked || '',
configured: !!d?.videoai?.custom?.configured configured: !!d?.videoai?.custom?.configured
} }
@@ -135,10 +135,10 @@ export default function SettingsModal({ open, onClose, versionLabel, initialTab
setApiKeyInput(''); setApiKeyInput('');
if (data?.videoai) { if (data?.videoai) {
setVa({ setVa({
provider: data.videoai.provider === 'custom' ? 'custom' : 'inherit', provider: data.videoai.provider === 'inherit' ? 'inherit' : 'custom',
custom: { custom: {
url: data.videoai.custom?.url || '', url: data.videoai.custom?.url || 'https://ai.88531.cn/v1',
model: data.videoai.custom?.model || '', model: data.videoai.custom?.model || 'mimo-v2.6-flash',
apiKeyMasked: data.videoai.custom?.apiKeyMasked || '', apiKeyMasked: data.videoai.custom?.apiKeyMasked || '',
configured: !!data.videoai.custom?.configured configured: !!data.videoai.custom?.configured
} }
@@ -532,7 +532,7 @@ export default function SettingsModal({ open, onClose, versionLabel, initialTab
type="text" type="text"
value={va.custom.url} value={va.custom.url}
onChange={(e) => setVa((v) => ({ ...v, custom: { ...v.custom, url: e.target.value } }))} onChange={(e) => setVa((v) => ({ ...v, custom: { ...v.custom, url: e.target.value } }))}
placeholder="https://api.openai.com/v1 或 http://192.168.68.19:3099/v1" placeholder="https://ai.88531.cn/v1"
className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100" className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
/> />
</div> </div>
@@ -556,6 +556,15 @@ export default function SettingsModal({ open, onClose, versionLabel, initialTab
className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100" className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
/> />
</div> </div>
<div className="p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg">
<div className="text-xs font-semibold text-blue-700 dark:text-blue-300 mb-1">免费注册领额度</div>
<div className="text-xs text-blue-700/90 dark:text-blue-300/90 leading-relaxed">
没有 API Key?前往{' '}
<a href="https://ai.88531.cn/register" target="_blank" rel="noreferrer" className="font-medium underline hover:text-blue-800 dark:hover:text-blue-200">ai.88531.cn 免费注册</a>
,注册即送体验金、每天签到再领 ¥0.5;登录后在「令牌」页创建一个 Key 粘贴到上方即可。
默认已填好接口地址 https://ai.88531.cn/v1 与模型 mimo-v2.6-flash。
</div>
</div>
</div> </div>
)} )}