From 365ea069f179ee71a7a8cc7785ccd2d86bd4881c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 03 二月 2021 18:33:45 +0800 Subject: [PATCH] 2021-02-03 --- src/index.js | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index b79cd9c..e03e548 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import { Provider } from 'react-redux' import store from '@/store' import * as serviceWorker from './serviceWorker' -import options from '@/store/options.js' +import options, { styles } from '@/store/options.js' import '@/assets/css/main.scss' import '@/assets/css/action.scss' import '@/assets/css/minkeicon.css' @@ -12,6 +12,8 @@ if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { window.location.replace(window.location.href.split(/(index.html)+/ig)[0] + 'mob/index.html') +} else if (window.location.href.indexOf('#/design') > -1) { // 缂栬緫椤甸潰鍒锋柊鏃讹紝璺宠浆鑷充富椤� + window.location.replace(window.location.href.replace(/design/ig, 'main')) } options.sysType = window.atob(options.sysType.replace('$mk', '')) @@ -160,8 +162,8 @@ 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' : '') + if (GLOB.style && styles[GLOB.style]) { + document.body.className = styles[GLOB.style] + ' ' + (GLOB.showline === 'false' ? 'hidden-split-line' : '') } } catch { console.warn('Parse Failure') @@ -189,10 +191,6 @@ GLOB.linkurl = '' GLOB.location = 'http://qingqiumarket.cn' GLOB.service = 'mkwms/' - } - - if (GLOB.style && options.styles[GLOB.style]) { - document.getElementById('root').className = options.styles[GLOB.style] } Object.defineProperty(GLOB, 'appId', { -- Gitblit v1.8.0