From 6d6b0dd44355d398dfbff8c5727a25a84baaa0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=A3=E8=A8=80=E5=B0=B1=E6=98=AFSiam?= <59419979@qq.com> Date: Wed, 22 Jan 2025 03:25:39 +0000 Subject: [PATCH] optimzie doc redirect --- .gitignore | 1 + public/index.html | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index eb8350a..c1e57b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules/ /.idea +package-lock.json \ No newline at end of file diff --git a/public/index.html b/public/index.html index e32656b..a0ee93d 100644 --- a/public/index.html +++ b/public/index.html @@ -15,6 +15,11 @@ default: break; } + // redirect with hash + if (window.location.hash){ + path += window.location.hash; + } + window.onload = function () { window.location.href = path; }