[bugfix] 尝试修复二级目录访问问题
This commit is contained in:
parent
dfd19bdf1a
commit
22ad399410
|
@ -7,6 +7,7 @@ server {
|
|||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ function logout() {
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/admin/index';
|
||||
})
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
|
|
@ -161,6 +161,7 @@ export const dynamicRoutes = [
|
|||
]
|
||||
|
||||
const router = createRouter({
|
||||
base: '/admin',
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue