From 830497747bd3651119647942d403dc440ce25966 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 9 Nov 2022 14:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9A=E4=BA=86=E4=B8=80=E4=B8=AA=E6=9C=89?= =?UTF-8?q?=E7=82=B9=E7=BB=95=E7=9A=84=E9=87=8D=E5=AE=9A=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/nginx.htaccess | 3 +++ src/main.js | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 public/nginx.htaccess diff --git a/public/nginx.htaccess b/public/nginx.htaccess new file mode 100644 index 000000000..a8cd7842c --- /dev/null +++ b/public/nginx.htaccess @@ -0,0 +1,3 @@ +location /login_sdt { + rewrite ^ /index.html last; +} diff --git a/src/main.js b/src/main.js index 83da7bbc3..2795bc8f5 100644 --- a/src/main.js +++ b/src/main.js @@ -40,6 +40,15 @@ if (getQueryPara("token")) { console.log("token222222", localStorage.getItem("token")); } +(function () { + let href = location.href; + if (href.endsWith("#/") && href.includes("/login_sdt")) { + href = href.slice(0, -2); + href = href.replace("login_sdt", "#/login_sdt"); + location.href = href; + } +})(); + window.app = Object.assign( {}, {