From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:51:02 +0800 Subject: [PATCH] 2024-05-21 --- src/index.js | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 96650ef..caf9ae3 100644 --- a/src/index.js +++ b/src/index.js @@ -88,6 +88,13 @@ GLOB.externalDatabase = null } + if (config.probation && /^20\d{2}-\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()) { + GLOB.forcedUpdate = true + } + // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { if (!config.mainSystemApi) { @@ -102,12 +109,6 @@ } GLOB.systemType = 'production' - if (config.probation && /^20\d{2}-\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()) { - GLOB.forcedUpdate = true - } } else if (GLOB.sysType === 'local') { GLOB.probation = true GLOB.debugger = true @@ -258,6 +259,11 @@ sessionStorage.setItem('system_mark', _mark) } + if (config.mainkey && GLOB.sysType !== 'cloud' && config.mainkey !== options.cakey) { + GLOB.localkey = GLOB.appkey + GLOB.appkey = config.mainkey + } + let lang = localStorage.getItem(_href + 'lang') || (config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') sessionStorage.setItem('lang', lang) -- Gitblit v1.8.0