接口前缀调整

This commit is contained in:
qsh
2024-05-23 18:07:49 +08:00
parent 33be215c0a
commit 8adaf72682
18 changed files with 124 additions and 84 deletions

View File

@@ -7,6 +7,7 @@ import { usePageLoading } from '@/hooks/web/usePageLoading'
import { useDictStoreWithOut } from '@/store/modules/dict'
import { useUserStoreWithOut } from '@/store/modules/user'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
import { getTenantId, getAppId } from '@/utils/auth'
const { start, done } = useNProgress()
@@ -50,7 +51,13 @@ router.beforeEach(async (to, from, next) => {
if (whiteList.indexOf(to.path) !== -1) {
next()
} else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
const tenantId = getTenantId()
const appId = getAppId()
if (tenantId && appId) {
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
} else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
}
}
}
})