From c986f2f56bb153a9b6cebc74b4d9334c85ddfdda Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 04 一月 2021 18:54:02 +0800 Subject: [PATCH] 2020-01-04 --- src/index.js | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 5d93fdd..7a0c4f7 100644 --- a/src/index.js +++ b/src/index.js @@ -43,9 +43,19 @@ ) } -sessionStorage.removeItem('isEditState') -// fetch(`./${process.env.NODE_ENV === 'production' ? 'build/' : ''}options.json`) +if (sessionStorage.getItem('loginError')) { + try { + let res = JSON.parse(sessionStorage.getItem('loginError')) + console.info(res.request) + console.info(res.response) + } catch {} +} +sessionStorage.removeItem('isEditState') +sessionStorage.removeItem('loginError') +sessionStorage.setItem('role_id', sessionStorage.getItem('localRole_id') || '') +sessionStorage.setItem('dataM', sessionStorage.getItem('localDataM') || '') + fetch(`./options.json`) .then(response => response.json()) .catch(() => { @@ -60,9 +70,10 @@ GLOB.filter = config.filter || '' if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { - GLOB.externalDatabase = config.externalDatabase || '' + GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' } else { GLOB.externalDatabase = null + } // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 @@ -140,6 +151,7 @@ GLOB.doclogo = _systemMsg.doclogo GLOB.webSite = _systemMsg.webSite GLOB.style = _systemMsg.style + GLOB.showline = _systemMsg.showline || '' if (GLOB.favicon) { let link = document.querySelector("link[rel*='icon']") || document.createElement('link') @@ -147,6 +159,9 @@ link.rel = 'shortcut icon' link.href = GLOB.favicon document.getElementsByTagName('head')[0].appendChild(link) + } + if (GLOB.style && options.styles[GLOB.style]) { + document.body.className = options.styles[GLOB.style] + ' ' + (GLOB.showline === 'false' ? 'hidden-split-line' : '') } } catch { console.warn('Parse Failure') @@ -172,7 +187,7 @@ GLOB.service = _service ? _service + '/' : '' } else { GLOB.linkurl = '' - GLOB.location = 'http://qingqiumarket.cn/' + GLOB.location = 'http://qingqiumarket.cn' GLOB.service = 'mkwms/' } -- Gitblit v1.8.0