This commit is contained in:
super
2026-03-30 20:39:13 +08:00
parent a07b9d7fb2
commit b8f88ca06e
7 changed files with 319 additions and 129 deletions

View File

@@ -203,6 +203,7 @@ export interface DeleteBrandTaskItem {
export interface DeleteBrandTaskDetailVo {
task: DeleteBrandTaskItem
line_progress: DeleteBrandLineProgress
items?: DeleteBrandResultItem[]
}
export interface DeleteBrandTaskBatchVo {
@@ -384,7 +385,11 @@ export function submitDeleteBrandResult(taskId: number, request: DeleteBrandSubm
}
export function getJavaDownloadUrl(path: string) {
const raw = path.startsWith('http://') || path.startsWith('https://') ? path : `${JAVA_API_PREFIX}${path}`
let raw = path.startsWith('http://') || path.startsWith('https://') ? path : `${JAVA_API_PREFIX}${path}`
// 核心修复pywebview 的 save_file_from_url 需要完整带 schema 的 URL
if (!raw.startsWith('http://') && !raw.startsWith('https://') && typeof window !== 'undefined') {
raw = `${window.location.origin}${raw}`
}
const separator = raw.includes('?') ? '&' : '?'
return `${raw}${separator}user_id=${encodeURIComponent(String(getCurrentUserId()))}`
}