mirror of
https://github.com/jumpserver/lina.git
synced 2025-05-11 09:35:34 +00:00
fix: 修复重定向 url 包含 /ui/# 前缀
This commit is contained in:
parent
d0cd7915b7
commit
16236dda09
@ -18,9 +18,14 @@
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const baseUrl = "/ui/"
|
||||
if (location.pathname === '/' && baseUrl !== '/') {
|
||||
if (location.pathname === '/') {
|
||||
location.pathname = baseUrl
|
||||
}
|
||||
const origin = window.location.origin
|
||||
const pathname = window.location.pathname
|
||||
if(pathname.indexOf('/ui') === -1) {
|
||||
window.location.href = origin + '/ui/#' + pathname
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div id="app"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user