| | |
| | | sessionStorage.setItem('role_id', sessionStorage.getItem('localRole_id') || '') |
| | | sessionStorage.setItem('dataM', sessionStorage.getItem('localDataM') || '') |
| | | |
| | | // 测试系统文件置于admin中 |
| | | // 新系统文件置于admin中 ../options.json |
| | | |
| | | fetch('./options.json') |
| | | // fetch(process.env.NODE_ENV === 'production' ? '../options.json' : './options.json') |
| | | .then(response => response.json()) |
| | | .catch(() => { |
| | | document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">系统配置信息获取失败,请联系管理员!</div>' |
| | |
| | | } |
| | | if (config.mainSystemApi) { |
| | | let systemApi = config.mainSystemApi |
| | | |
| | | // if (/^(http|https):\/\//ig.test(systemApi)) { |
| | | // let _systemApi = /^(http|https):\/\/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/ig.exec(systemApi) |
| | | |
| | | // systemApi = _systemApi ? _systemApi[0] : '' |
| | | // } else { |
| | | // systemApi = '' |
| | | // } |
| | | |
| | | // // 业务系统连接云端时,格式化处理 |
| | | // if (systemApi && systemApi === /^(http|https):\/\/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/ig.exec(options.cloudServiceApi)[0]) { |
| | | // GLOB.dataFormat = true |
| | | // } |
| | | |
| | | // if (systemApi) { |
| | | // systemApi = systemApi + '/webapi/dostars' |
| | | // } |
| | | |
| | | // 业务系统不允许连接云端,业务系统连接sso.mk9h.cn时,数据虚化处理 |
| | | if (systemApi && systemApi.indexOf('cloud.mk9h.cn') > -1) { |
| | | systemApi = '' |