处理下载为公共模块

This commit is contained in:
super
2026-06-12 13:40:29 +08:00
parent 17236265c6
commit 8672668c33
13 changed files with 62 additions and 37 deletions

View File

@@ -982,7 +982,7 @@ function canDownload(item: ProductRiskHistoryItem) {
async function downloadResult(item: ProductRiskHistoryItem) {
if (!item.resultId) return
const url = getProductRiskResultDownloadUrl(item.resultId)
const url = item.downloadUrl || getProductRiskResultDownloadUrl(item.resultId)
const filename = item.outputFilename || `${item.shopName || 'result'}.zip`
const result = await saveUrlWithProgress(url, filename, `product-risk:${item.resultId}`)