From c4b00cbf85f10ed9e010aaf6066163927cb8a768 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 11 Oct 2026 13:19:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=89=E8=A3=85=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=86=8D=E5=8A=A0=E5=9B=BA=20+=20index.html?= =?UTF-8?q?=20=E7=A6=81=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx.conf | 9 ++++++++- frontend/src/views/Installations.vue | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index 85d6fe9..284e0eb 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -4,11 +4,18 @@ server { server_name _; root /var/www/public; - index index.php index.html; + index index.html index.php; client_max_body_size 20M; # 前端 SPA fallback + location = /index.html { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + expires 0; + try_files $uri =404; + } + location / { try_files $uri $uri/ /index.html; } diff --git a/frontend/src/views/Installations.vue b/frontend/src/views/Installations.vue index bec286e..a3eeb99 100644 --- a/frontend/src/views/Installations.vue +++ b/frontend/src/views/Installations.vue @@ -165,7 +165,7 @@ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" - @current-change="fetchList" + @current-change="handlePageChange" /> @@ -314,6 +314,13 @@ function handleSizeChange() { fetchList() } +function handlePageChange(p) { + if (p && Number(p) !== Number(page.value)) { + page.value = Number(p) + } + fetchList() +} + function showDetail(row) { detailRow.value = row detailVisible.value = true