From 76cd767afa6bd12a3f0e204db0e9544044fc7396 Mon Sep 17 00:00:00 2001 From: 1708-huayu <57060237+1708-huayu@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:36:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=8F=91=E7=89=88=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx.conf | 6 ++++-- src/app/page.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index cfed3c0..f88041d 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -45,9 +45,11 @@ http { # 第二个页面的配置 location ^~ /mobile/ { - root /usr/share/nginx/html; +# index index.html index.htm; +# try_files $uri $uri.html $uri/ =404; + alias /usr/share/nginx/html/mobile/; index index.html index.htm; - try_files $uri $uri.html $uri/ =404; + try_files $uri $uri/ /mobile/index.html; } location ^~ /todo-server/ { diff --git a/src/app/page.tsx b/src/app/page.tsx index 0ea4f1f..483ef6a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,7 +9,7 @@ export default function Home() { useEffect(()=>{ if(localStorage.getItem('platform-security')){ if (isMobile){ - window.location.href = 'http://www.huaruyu.com/mobile' + window.location.href = 'http://www.huaruyu.com:80/mobile/listTask' }else { replace("/task/project") }