| | |
| | | |
| | | } |
| | | |
| | | sessionStorage.setItem('UserID', localStorage.getItem('UserID') || '') |
| | | sessionStorage.setItem('LoginUID', localStorage.getItem('LoginUID') || '') |
| | | sessionStorage.setItem('User_Name', localStorage.getItem('User_Name') || '') |
| | | sessionStorage.setItem('Full_Name', localStorage.getItem('Full_Name') || '') |
| | | sessionStorage.setItem('avatar', localStorage.getItem('avatar') || '') |
| | | sessionStorage.setItem('dataM', localStorage.getItem('dataM') || '') |
| | | sessionStorage.setItem('localDataM', localStorage.getItem('localDataM') || '') |
| | | sessionStorage.setItem('debug', localStorage.getItem('debug') || '') |
| | | sessionStorage.setItem('role_id', localStorage.getItem('role_id') || '') |
| | | sessionStorage.setItem('departmentcode', localStorage.getItem('departmentcode') || '') |
| | | sessionStorage.setItem('organization', localStorage.getItem('organization') || '') |
| | | sessionStorage.setItem('mk_user_type', localStorage.getItem('mk_user_type') || '') |
| | | |
| | | fetch('../options.json') |
| | | .then(response => response.json()) |
| | | .catch(() => { |
| | |
| | | GLOB.externalDatabase = null |
| | | } |
| | | |
| | | if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { |
| | | if (config.probation && /^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { |
| | | GLOB.probation = true |
| | | } |
| | | if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) { |
| | | if (config.forcedUpdate && /^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) { |
| | | GLOB.forcedUpdate = true |
| | | } |
| | | |
| | |
| | | GLOB.systemType = 'production' |
| | | } else if (GLOB.sysType === 'local') { |
| | | GLOB.probation = true |
| | | GLOB.debugger = true |
| | | // GLOB.debugger = true |
| | | GLOB.systemType = '' |
| | | GLOB.upStatus = config.updateStatus + '' !== 'false' |
| | | |
| | | GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars' |
| | | |
| | | if (config.style_appkey) { |
| | | GLOB.style_appkey = config.style_appkey |
| | | } |
| | | |
| | | // GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars' |
| | | |
| | | GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars' |
| | | if (!/^https/.test(window.location.protocol)) { // https转换 |
| | | GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars' |
| | | } |
| | | |
| | | // GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars' |
| | | // if (!/^https/.test(window.location.protocol)) { // https转换 |
| | | // GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars' |
| | | // } |
| | | |
| | | if (GLOB.watermark) { |
| | | GLOB.dataFormat = true |
| | |
| | | GLOB.appkey = config.mainkey |
| | | } |
| | | |
| | | let lang = localStorage.getItem(window.location.href.split('#')[0] + 'lang') || GLOB.defLang || 'zh-CN' |
| | | let lang = sessionStorage.getItem('lang') || localStorage.getItem(window.location.href.split('#')[0] + 'lang') || GLOB.defLang || 'zh-CN' |
| | | sessionStorage.setItem('lang', lang) |
| | | |
| | | GLOB.sysSign = GLOB.service + 'admin/' + lang + '/' |
| | |
| | | GLOB.mainlogo = _systemMsg.mainlogo |
| | | GLOB.doclogo = _systemMsg.doclogo |
| | | GLOB.webSite = _systemMsg.webSite |
| | | GLOB.prolType = _systemMsg.prolType || '' |
| | | GLOB.prolCont = _systemMsg.prolCont || '' |
| | | GLOB.style = _systemMsg.style || 'bg_black_style_blue' |
| | | GLOB.showline = _systemMsg.showline || '' |
| | | GLOB.navBar = _systemMsg.navBar || 'shutter' |
| | |
| | | |
| | | document.body.className = className |
| | | |
| | | if (/^https/.test(window.location.protocol)) { // https转换 |
| | | if (/^https/.test(window.location.protocol) || (process.env.NODE_ENV !== 'production' && /^https/.test(config.host))) { // https转换 |
| | | let meta = document.createElement('meta') |
| | | meta.content = 'upgrade-insecure-requests' |
| | | meta.httpEquiv = 'Content-Security-Policy' |
| | |
| | | |
| | | document.title = GLOB.platTitle || '' |
| | | |
| | | if (config.filter === 'true' || (/^20\d{2}-\d{2}-\d{2}$/.test(config.filter) && new Date(config.filter).getTime() + 86400000 >= new Date().getTime())) { |
| | | if (config.filter === 'true' || (/^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.filter) && new Date(config.filter).getTime() + 86400000 >= new Date().getTime())) { |
| | | GLOB.filter = true |
| | | } |
| | | |
| | |
| | | window.GLOB.SyncData = new Map() // 存储同步查询数据 |
| | | window.GLOB.mkThdMenus = new Map() // 三级菜单 |
| | | |
| | | if (lang === 'zh-CN' || !/#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) { // 开发使用中文 |
| | | if (lang === 'zh-CN' || !/#\/(login|main|billprint|docprint|tab\/|iframe|view|ssologin)/.test(window.location.href)) { // 开发使用中文 |
| | | ReactDOM.render( |
| | | <ConfigProvider locale={zhCN}> |
| | | <Route/> |