From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 01 九月 2021 10:31:45 +0800 Subject: [PATCH] 2021-09-01 --- src/index.js | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index fcc809d..d6c0ef7 100644 --- a/src/index.js +++ b/src/index.js @@ -50,16 +50,16 @@ 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') || '') -// 鏂扮郴缁熸枃浠剁疆浜巃dmin涓� ../options.json +// 鏂扮郴缁熸枃浠剁疆浜巃dmin涓� ../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>' @@ -70,6 +70,7 @@ let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' + GLOB.licenseKey = config.licenseKey || '' if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' @@ -119,6 +120,8 @@ 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') @@ -151,7 +154,7 @@ 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') } } -- Gitblit v1.8.0