| | |
| | | let res = JSON.parse(sessionStorage.getItem('loginError')) |
| | | console.info(res.request) |
| | | console.info(res.response) |
| | | } catch {} |
| | | } catch (e) {} |
| | | } |
| | | sessionStorage.removeItem('isEditState') |
| | | sessionStorage.removeItem('loginError') |
| | | sessionStorage.setItem('role_id', sessionStorage.getItem('localRole_id') || '') |
| | | sessionStorage.setItem('dataM', sessionStorage.getItem('localDataM') || '') |
| | | |
| | | // 新系统文件置于admin中 ../options.json |
| | | // 新系统文件置于admin中 ../options.json , { cache: 'no-cache'} |
| | | |
| | | fetch('./options.json') |
| | | fetch('../options.json') |
| | | .then(response => response.json()) |
| | | .catch(() => { |
| | | document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">系统配置信息获取失败,请联系管理员!</div>' |
| | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | | GLOB.filter = config.filter || '' |
| | | GLOB.licenseKey = config.licenseKey || '' |
| | | |
| | | if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { |
| | | GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' |
| | |
| | | |
| | | if (localStorage.getItem(_href + 'lang')) { |
| | | sessionStorage.setItem('lang', localStorage.getItem(_href + 'lang')) |
| | | } else { |
| | | sessionStorage.setItem('lang', config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') |
| | | } |
| | | |
| | | let _systemMsg = localStorage.getItem(_href + 'system') |
| | |
| | | if (GLOB.style && styles[GLOB.style]) { |
| | | document.body.className = styles[GLOB.style] + ' ' + (GLOB.showline === 'false' ? 'hidden-split-line' : '') |
| | | } |
| | | } catch { |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | } |
| | | } |
| | | |
| | | document.title = GLOB.platTitle || '' |
| | | |
| | | if (GLOB.filter === 'true') { |
| | | if (config.filter === 'true') { |
| | | let html = document.getElementsByTagName('html')[0] |
| | | |
| | | if (html) { |