From 29432c9167e3fcdf83f35d0bb9dbe9acb7c7ffbf Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 22 六月 2021 14:35:23 +0800 Subject: [PATCH] 2021-06-22 --- src/index.js | 32 ++++++-------------------------- 1 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/index.js b/src/index.js index a1f9912..fcc809d 100644 --- a/src/index.js +++ b/src/index.js @@ -57,7 +57,7 @@ sessionStorage.setItem('role_id', sessionStorage.getItem('localRole_id') || '') sessionStorage.setItem('dataM', sessionStorage.getItem('localDataM') || '') -// 娴嬭瘯绯荤粺鏂囦欢缃簬admin涓� +// 鏂扮郴缁熸枃浠剁疆浜巃dmin涓� ../options.json fetch('./options.json') .then(response => response.json()) @@ -66,17 +66,15 @@ }) .then(config => { if (!config) return - + let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' - GLOB.filter = config.filter || '' if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' } else { GLOB.externalDatabase = null - } // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 @@ -106,24 +104,6 @@ } if (config.mainSystemApi) { let systemApi = config.mainSystemApi - - // if (/^(http|https):\/\//ig.test(systemApi)) { - // let _systemApi = /^(http|https):\/\/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/ig.exec(systemApi) - - // systemApi = _systemApi ? _systemApi[0] : '' - // } else { - // systemApi = '' - // } - - // // 涓氬姟绯荤粺杩炴帴浜戠鏃讹紝鏍煎紡鍖栧鐞� - // if (systemApi && systemApi === /^(http|https):\/\/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/ig.exec(options.cloudServiceApi)[0]) { - // GLOB.dataFormat = true - // } - - // if (systemApi) { - // systemApi = systemApi + '/webapi/dostars' - // } - // 涓氬姟绯荤粺涓嶅厑璁歌繛鎺ヤ簯绔紝涓氬姟绯荤粺杩炴帴sso.mk9h.cn鏃讹紝鏁版嵁铏氬寲澶勭悊 if (systemApi && systemApi.indexOf('cloud.mk9h.cn') > -1) { systemApi = '' @@ -159,7 +139,7 @@ GLOB.webSite = _systemMsg.webSite GLOB.style = _systemMsg.style GLOB.showline = _systemMsg.showline || '' - GLOB.navBar = _systemMsg.navBar || 'sidemenu' + GLOB.navBar = _systemMsg.navBar || '' if (GLOB.favicon) { let link = document.querySelector("link[rel*='icon']") || document.createElement('link') @@ -178,7 +158,7 @@ document.title = GLOB.platTitle || '' - if (GLOB.filter === 'true') { + if (config.filter === 'true') { let html = document.getElementsByTagName('html')[0] if (html) { @@ -195,8 +175,8 @@ GLOB.service = _service ? _service + '/' : '' } else { GLOB.linkurl = '' - GLOB.location = 'http://qingqiumarket.cn' - GLOB.service = 'mkwms/' + GLOB.location = config.host + GLOB.service = config.service } Object.defineProperty(GLOB, 'appId', { -- Gitblit v1.8.0