mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 20:17:54 +00:00
Merge pull request #2741 from jumpserver/pr@dev@fix_indexurl
fix: 修复重定向 url 包含 /ui/# 前缀
This commit is contained in:
@@ -18,9 +18,14 @@
|
|||||||
<script>
|
<script>
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
const baseUrl = "/ui/"
|
const baseUrl = "/ui/"
|
||||||
if (location.pathname === '/' && baseUrl !== '/') {
|
if (location.pathname === '/') {
|
||||||
location.pathname = baseUrl
|
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>
|
</script>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
Reference in New Issue
Block a user