| | |
| | | |
| | | window.GLOB = window.GLOB || {} |
| | | |
| | | if (!(options.systemType === 'local' && window.GLOB.systemType === 'official')) { |
| | | if (!(options.systemType === 'local' && window.GLOB.systemType === 'official')) { // 只有业务系统才可以设置为正式系统 |
| | | window.GLOB.systemType = 'test' |
| | | } |
| | | if (options.systemType !== 'local') { // sso,cloud不可设置单点服务器地址 |
| | | window.GLOB.mainSystemApi = '' |
| | | } else if (options.systemType === 'local' && window.GLOB.mainSystemApi) { // 业务系统 |
| | | let systemApi = window.GLOB.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]) { |
| | | window.GLOB.dataFormat = true |
| | | } |
| | | |
| | | if (systemApi) { |
| | | systemApi = systemApi + '/webapi/dostars' |
| | | } |
| | | |
| | | window.GLOB.mainSystemApi = systemApi |
| | | } |
| | | |
| | | let _systemMsg = localStorage.getItem(window.location.href.split('#')[0] + 'system') |
| | |
| | | if (window.GLOB.style && option[window.GLOB.style]) { |
| | | document.getElementById('root').className = option[window.GLOB.style] |
| | | } |
| | | |
| | | if (process.env.NODE_ENV === 'production') { |
| | | let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : '' |
| | | window.GLOB.subSystemApi = document.location.origin + '/' + service + 'webapi/dostars' |
| | | } else { |
| | | window.GLOB.subSystemApi = 'http://qingqiumarket.cn/mkwms/webapi/dostars' |
| | | } |
| | | |
| | | |
| | | sessionStorage.removeItem('isEditState') |
| | | |