| | |
| | | import React from 'react' |
| | | import ReactDOM from 'react-dom' |
| | | import Route from './router' |
| | | import {Provider} from 'react-redux' |
| | | import { Provider } from 'react-redux' |
| | | import store from '@/store' |
| | | import * as serviceWorker from './serviceWorker' |
| | | import options from '@/store/options.js' |
| | |
| | | ) |
| | | } |
| | | |
| | | 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(() => { |
| | |
| | | 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 |
| | | |
| | | } |
| | | |
| | | // 只有业务系统才可以设置为正式系统 |
| | | if (options.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { |
| | |
| | | // 业务系统不允许连接云端,业务系统连接sso.mk9h.cn时,数据虚化处理 |
| | | if (systemApi && systemApi.indexOf('cloud.mk9h.cn') > -1) { |
| | | systemApi = '' |
| | | } else if (systemApi && systemApi.indexOf('sso.mk9h.cn') > -1) { |
| | | } else if (systemApi && systemApi.indexOf('sso.mk9h.cn') > -1 && process.env.NODE_ENV === 'production') { |
| | | GLOB.dataFormat = true |
| | | } |
| | | |
| | |
| | | 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') |
| | |
| | | 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') |
| | |
| | | GLOB.service = _service ? _service + '/' : '' |
| | | } else { |
| | | GLOB.linkurl = '' |
| | | GLOB.location = 'http://qingqiumarket.cn/' |
| | | GLOB.location = 'http://qingqiumarket.cn' |
| | | GLOB.service = 'mkwms/' |
| | | } |
| | | |