This commit is contained in:
itcsx committed 2026-09-22 10:13:49 +08:00
1 parent 2e1974c35d
commit 9cf69dee5d
3 files changed
+84 -6

No files matched your search

+12 -4
View File
@@ -370,21 +370,29 @@ const clearRefreshTimers = () => {
const onUploadComplete = (payload: { count?: number }) => {
const count = payload?.count ?? 1;
const sec = 2500 + (count - 1) * 1000;
// 本次是不是视频:只有视频才需要补刷和转码提示
const isVideo = uploadingVideo.value;
// 视频场景由转码提示接管文案,等首刷完成后再切回"加载中..."
if (!uploadingVideo.value) spinTip.value = "加载中...";
if (!isVideo) spinTip.value = "加载中...";
clearRefreshTimers();
refreshTimers.push(
window.setTimeout(() => {
// 列表已经刷出来了,转码提示到此为止(后续补刷沿用默认的"加载中...")
// 列表已经刷出来了,转码提示到此为止
stopTranscodeTip();
uploadingVideo.value = false;
onReSearch();
loading.value = false;
}, sec),
);
refreshTimers.push(window.setTimeout(onReSearch, sec + 3000));
refreshTimers.push(window.setTimeout(onReSearch, sec + 6000));
// 只有视频才补刷:封面(jpg)是服务端 ffmpeg 异步生成的,首刷时可能还没落盘;
// 每次查询服务端都会重新拼 ?v=,src 变了 <img> 才会重新请求,封面就能补上来。
// 图片/音频/普通文件上传后文件已经就绪,一次刷新就够,多刷纯属浪费。
if (isVideo) {
refreshTimers.push(window.setTimeout(onReSearch, sec + 3000));
refreshTimers.push(window.setTimeout(onReSearch, sec + 6000));
}
};
/** 中断时的断点信息,弹窗里展示用 */