This commit is contained in:
zk
2024-09-23 16:43:57 +08:00
parent ca4a9a8c28
commit 278e91c262
26 changed files with 376 additions and 45 deletions
+11 -1
View File
@@ -4,7 +4,10 @@ export enum PageEnum {
BASE_LOGIN = '/login',
BASE_HOME = '/home',
BASE_LOGIN_YINCHUAN = '/screenLogin',
// centralScreenLogin
CENTRAL_SCREEN_LOGIN = '/centralScreenLogin',
YINCHUAN_HOME = '/yinChuanHome',
CENTRAL_SCREEN = '/centralScreen',
}
export function setBaseLogin(baseLogin) {
@@ -18,12 +21,15 @@ export function getBaseLogin() {
//根据当前路径跳转登录页
export function toLoginByNowPath(nowPath: string) {
const xianPath = ['/home', '/secondScreen', '/'];
const yinchuanPath = ['/yinChuanHome', '/yinChuanTest'];
//其他应急中心的页面路径
const centerPath = ['/centralScreen', '/centralScreenLogin'];
if (xianPath.includes(nowPath)) {
return PageEnum.BASE_LOGIN;
} else if (yinchuanPath.includes(nowPath)) {
return PageEnum.BASE_LOGIN_YINCHUAN;
} else if (centerPath.includes(nowPath)) {
return PageEnum.CENTRAL_SCREEN_LOGIN;
}
}
@@ -33,10 +39,14 @@ export function toHomeByLogoutPath(nowPath: string) {
const xianPath = ['/home', '/secondScreen', '/'];
//银川的页面路径
const yinchuanPath = ['/yinChuanHome', '/yinChuanTest'];
//其他应急中心的页面路径
const centerPath = ['/centralScreen'];
if (xianPath.includes(nowPath)) {
return PageEnum.BASE_HOME;
} else if (yinchuanPath.includes(nowPath)) {
return PageEnum.YINCHUAN_HOME;
} else if (centerPath.includes(nowPath)) {
return PageEnum.YINCHUAN_HOME;
}
}