[bugfix] 尝试修复二级目录访问问题

This commit is contained in:
zhengyi 2023-05-03 22:57:41 +08:00
parent dfd19bdf1a
commit 22ad399410
4 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ server {
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}

View File

@ -89,7 +89,7 @@ function logout() {
type: 'warning'
}).then(() => {
userStore.logOut().then(() => {
location.href = '/index';
location.href = '/admin/index';
})
}).catch(() => { });
}

View File

@ -161,6 +161,7 @@ export const dynamicRoutes = [
]
const router = createRouter({
base: '/admin',
history: createWebHistory(),
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {

View File

@ -81,7 +81,7 @@ service.interceptors.response.use(res => {
ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false;
useUserStore().logOut().then(() => {
location.href = '/index';
location.href = '/admin/index';
})
}).catch(() => {
isRelogin.show = false;