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 | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 4ca1c39..7a0c4f7 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,8 @@ } 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()) @@ -68,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紡绯荤粺 @@ -148,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') @@ -155,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') @@ -180,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