From b540a4b3400f4c5eefdc9cd790793acd8d60cb50 Mon Sep 17 00:00:00 2001 From: SZCJW <792430652@qq.com> Date: Wed, 4 Mar 2026 22:53:31 +0800 Subject: [PATCH] init --- static/style.css | 13 ++++++------- static/vue-app.js | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/static/style.css b/static/style.css index 4223bc6..40f5471 100644 --- a/static/style.css +++ b/static/style.css @@ -598,8 +598,8 @@ a:hover { align-items: center; justify-content: center; gap: var(--space-2); - padding: var(--space-3) var(--space-5); - font-size: var(--text-sm); + padding: var(--space-4) var(--space-6); + font-size: var(--text-base); font-weight: var(--font-medium); border-radius: var(--radius-lg); border: none; @@ -1482,17 +1482,16 @@ a:hover { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: var(--font-medium); - color: var(--text-secondary); - background: transparent; - border: 1px solid var(--border-default); + color: var(--text-primary); + background: var(--gray-100); + border: 1px solid var(--gray-300); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast) var(--ease-default); } .btn-logout:hover { - background: var(--gray-100); - color: var(--text-primary); + background: var(--gray-200); } .btn-login { diff --git a/static/vue-app.js b/static/vue-app.js index 7e2f497..8c763db 100644 --- a/static/vue-app.js +++ b/static/vue-app.js @@ -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 {