Browse Source

做了一个有点绕的重定向

dev-烟台中转登录2
dai 3 years ago
parent
commit
830497747b
  1. 3
      public/nginx.htaccess
  2. 9
      src/main.js

3
public/nginx.htaccess

@ -0,0 +1,3 @@
location /login_sdt {
rewrite ^ /index.html last;
}

9
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(
{},
{

Loading…
Cancel
Save