新版本官网优化完成
This commit is contained in:
@@ -22,7 +22,7 @@ export function getOriginDomain(): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* 域名的第一部分
|
||||
* 从域名的第一部分解析租户ID
|
||||
* 获取tenantId
|
||||
* @return 10140
|
||||
*/
|
||||
@@ -32,7 +32,14 @@ export function getDomainPart1(): any {
|
||||
return undefined;
|
||||
}
|
||||
if (typeof (split[0])) {
|
||||
return split[0];
|
||||
if(isInteger(split[0])){
|
||||
return split[0];
|
||||
}
|
||||
const arr = split[0].split('-');
|
||||
const tid = arr[arr.length - 1];
|
||||
if(isInteger(tid)){
|
||||
return tid;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@@ -43,7 +50,12 @@ export function getDomainPart1(): any {
|
||||
* @return 10140
|
||||
*/
|
||||
export function getTenantId() {
|
||||
return getDomainPart1();
|
||||
let tenantId = localStorage.getItem('TenantId');
|
||||
if(getDomainPart1()){
|
||||
tenantId = getDomainPart1();
|
||||
return tenantId;
|
||||
}
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user