|
@@ -18,14 +18,20 @@ export function setSystemInfo(data: any) {
|
|
|
localStorage.setItem('sysinfo', JSON.stringify(data));
|
|
|
// 使用的事base64加密的,解决之后的值 sysPasswordChangePeriod + "|" + isSecurityControlEnabled + "|" + isRsaEnabled+ "|" + _tag+ "|" + isSSOEnabled
|
|
|
// 顺序是,密码变更周期,是否启动安全控制,是否启用rsa,中间你需要根据 | 切割一下
|
|
|
- const [sysPasswordChangePeriod, isSecurityControlEnabled, isRsaEnabled, _tag, isSSOEnabled, isEnterprise] = window.atob(data.target).split('|')
|
|
|
+ // console.log(window.atob(data.target).split('|'))
|
|
|
+ const [sysPasswordChangePeriod, isSecurityControlEnabled, isRsaEnabled, _tag, isSSOEnabled, isEnterprise, btnEnabled, colEnabled, uploadFileWay] = window.atob(data.target).split('|')
|
|
|
// isEnterprise 是否为企业版,0代表专业版 1代表企业版
|
|
|
// 安全开关是否开启 按钮权限,列表权限,rsa权限在开启安全权限下才使用
|
|
|
- sessionStorage.setItem('isSecurityControlEnabled', Number(isSecurityControlEnabled) ? '1' : '');
|
|
|
- sessionStorage.setItem('isRsaEnabled', (Number(isSecurityControlEnabled) && Number(isRsaEnabled)) ? '1' : '');
|
|
|
+ const enabled = Number(isSecurityControlEnabled)
|
|
|
+ sessionStorage.setItem('isSecurityControlEnabled', enabled ? '1' : '');
|
|
|
+ sessionStorage.setItem('isRsaEnabled', (enabled && Number(isRsaEnabled)) ? '1' : '');
|
|
|
sessionStorage.setItem('sysPasswordChangePeriod', sysPasswordChangePeriod);
|
|
|
sessionStorage.setItem('isSSOEnabled', Number(isSSOEnabled) ? '1' : '');
|
|
|
sessionStorage.setItem('isEnterprise', Number(isEnterprise) ? '1' : '');
|
|
|
+
|
|
|
+ localStorage.setItem('btnNoAuth', (enabled && Number(btnEnabled)) ? '' : '1');
|
|
|
+ localStorage.setItem('colNoAuth', (enabled && Number(colEnabled)) ? '' : '1');
|
|
|
+ localStorage.setItem('uploadFileWay', uploadFileWay || '0');
|
|
|
}
|
|
|
|
|
|
export function getSystemInfo() {
|