From 2f230d376122acfbfee9a8552742c19de331c1e2 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Thu, 9 Jul 2026 15:28:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20=E7=94=9F=E4=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E8=A1=A5=E5=85=A8=E8=AE=A2=E5=8D=95/=E6=B8=A0?= =?UTF-8?q?=E9=81=93=E6=8C=87=E5=BC=95=E9=A1=B5=20SPA=20=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /order/guide、/channel/* 刷新时被 API 反代导致 404;与 nginx-docker.conf 对齐。 Co-authored-by: Cursor --- nginx-default.conf | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/nginx-default.conf b/nginx-default.conf index dd0e5ba..10f58f8 100644 --- a/nginx-default.conf +++ b/nginx-default.conf @@ -104,6 +104,9 @@ server { } # ============ 订单前端路由(^~ 须比下方 /order/ API 正则代理更优先)============ + location ^~ /order/guide { + try_files /index.html =200; + } location ^~ /order/priceCheck { try_files /index.html =200; } @@ -120,6 +123,41 @@ server { try_files /index.html =200; } + # ============ 渠道前端路由(^~ 须比下方 /channel/ API 正则代理更优先)============ + location ^~ /channel/guide { + try_files /index.html =200; + } + location ^~ /channel/salesProducts { + try_files /index.html =200; + } + location ^~ /channel/serviceChannels { + try_files /index.html =200; + } + location ^~ /channel/priceArea { + try_files /index.html =200; + } + location ^~ /channel/blacklist { + try_files /index.html =200; + } + location ^~ /channel/remoteZones { + try_files /index.html =200; + } + location ^~ /channel/weightRules { + try_files /index.html =200; + } + location ^~ /channel/weightRounding { + try_files /index.html =200; + } + location ^~ /channel/autoTrigger { + try_files /index.html =200; + } + location ^~ /channel/issueTemplate { + try_files /index.html =200; + } + location ^~ /channel/labelDesign { + try_files /index.html =200; + } + # ============ 系统管理前端路由(^~ 须比下方 /system/ API 正则代理更优先)============ # 页面路径为 camelCase;API 为 kebab(如 /system/dict/list、/system/batch-email/…),勿用宽泛前缀匹配 dict location = /system/dict {