From a837624af068cb3a3455f66d9932fc1509e37b25 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 六月 2025 23:37:34 +0800 Subject: [PATCH] 2025-06-10 --- src/index.js | 35 ++++++++++++++++++++++++----------- 1 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/index.js b/src/index.js index a1157c3..d5e094b 100644 --- a/src/index.js +++ b/src/index.js @@ -108,10 +108,10 @@ 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 } @@ -137,6 +137,10 @@ GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars' + if (config.style_appkey) { + GLOB.style_appkey = config.style_appkey + } + // 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' @@ -208,6 +212,7 @@ GLOB.host = window.location.host + (_service ? '_' + _service : '') GLOB.baseurl = document.location.origin + '/' + GLOB.service GLOB.linkurl = GLOB.baseurl + 'index.html' + GLOB.location = document.location.origin } else { GLOB.location = config.host GLOB.service = config.service @@ -229,7 +234,7 @@ 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 + '/' @@ -251,10 +256,14 @@ 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' GLOB.appVersion = _systemMsg.app_version || '' + GLOB.loginOtop = _systemMsg.loginOtop || '' + GLOB.loginOleft = _systemMsg.loginOleft || '' sessionStorage.setItem('appname', _systemMsg.appname || '') let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100] @@ -293,7 +302,7 @@ 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 } @@ -397,12 +406,16 @@ value: GLOB.debugger }) } else if (GLOB.sysType === 'cloud') { - Object.defineProperty(GLOB, 'debugger', { - writable: false, - value: GLOB.debugger - }) - - GLOB.breakpoint = false + if (sessionStorage.getItem('cloudRun') === 'debug') { + GLOB.debugger = true + } else { + Object.defineProperty(GLOB, 'debugger', { + writable: false, + value: GLOB.debugger + }) + + GLOB.breakpoint = false + } } else { if (sessionStorage.getItem('breakpoint')) { GLOB.debugger = true @@ -425,7 +438,7 @@ 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/> -- Gitblit v1.8.0