增加公共下载进度、增加接收SKU、密钥分别存放

This commit is contained in:
super
2026-05-28 16:41:20 +08:00
parent ca4a2cd07a
commit 2ed1250604
119 changed files with 4077 additions and 293 deletions

View File

@@ -340,6 +340,7 @@ import {
import { getPywebviewApi } from "@/shared/bridges/pywebview";
import { getTaskPollIntervalMs } from "@/shared/task-progress-config";
import { createCategorizedTimers } from "@/shared/utils/categorized-timers";
import { saveUrlWithProgress } from "@/shared/utils/download-progress";
const MAX_TRANSIENT_ERRORS = 30;
@@ -1105,14 +1106,9 @@ async function pushToPythonQueue() {
async function downloadResult(item: QueryAsinHistoryItem) {
if (!item.resultId) return;
const api = getPywebviewApi();
if (!api?.save_file_from_url_new) {
ElMessage.error("当前客户端未提供下载能力");
return;
}
const url = getQueryAsinResultDownloadUrl(item.resultId);
const filename = item.outputFilename || `${item.shopName || "result"}.xlsx`;
const result = await api.save_file_from_url_new(url, filename);
const result = await saveUrlWithProgress(url, filename, `query-asin:${item.resultId}`);
if (result.success) {
ElMessage.success(`已保存: ${result.path || filename}`);
} else if (result.error && result.error !== "用户取消") {