This commit is contained in:
2026-03-04 22:53:31 +08:00
parent 9c8b16871a
commit b540a4b340
2 changed files with 10 additions and 11 deletions
+4 -4
View File
@@ -761,7 +761,7 @@ const MoldInsightView = {
const loadHistory = async () => {
try {
state.history = await apiRequest('/history');
state.history = await apiRequest('/api/history');
} catch (e) {
console.error('加载历史记录失败:', e);
}
@@ -806,7 +806,7 @@ const MoldInsightView = {
formData.append("file", state.selectedFile);
try {
const res = await fetch("/upload", {
const res = await fetch("/api/upload", {
method: "POST",
headers: appState.token ? { 'Authorization': `Bearer ${appState.token}` } : {},
body: formData
@@ -833,7 +833,7 @@ const MoldInsightView = {
pollCount++;
state.progress = Math.min(90, 10 + pollCount * 0.5);
const task = await apiRequest(`/status/${taskId}`, { method: 'POST' });
const task = await apiRequest(`/api/status/${taskId}`, { method: 'POST' });
state.currentTask = task;
if (task.status === "completed") {
@@ -977,7 +977,7 @@ const ResultView = {
const loadTask = async () => {
try {
state.task = await apiRequest(`/status/${route.params.taskId}`, { method: 'POST' });
state.task = await apiRequest(`/api/status/${route.params.taskId}`, { method: 'POST' });
} catch (e) {
state.error = handleApiError(e, '加载任务详情');
} finally {