From 1b0fd0a20d54068f0f4716177780e00a75b860ef Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 10 一月 2020 17:12:34 +0800
Subject: [PATCH] 2020-01-10

---
 src/index.js |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/index.js b/src/index.js
index 2763702..f688691 100644
--- a/src/index.js
+++ b/src/index.js
@@ -22,18 +22,28 @@
   )
 }
 
-document.title = (window.GLOB && window.GLOB.title) || 'MinkeSoft'
+window.GLOB = window.GLOB || {}
+
+document.title = window.GLOB.title || 'MinkeSoft'
 
 const option = {
   white: 'mk-white'
 }
 
-if (window.GLOB && window.GLOB.style && option[window.GLOB.style]) {
+if (window.GLOB.style && option[window.GLOB.style]) {
   document.getElementById('root').className = option[window.GLOB.style]
 }
 
+if (process.env.NODE_ENV === 'production') {
+  let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
+  window.GLOB.subSystemApi = document.location.origin + '/' + service + 'webapi/dostar'
+} else {
+  window.GLOB.subSystemApi = 'http://qingqiumarket.cn/mkwms/webapi/dostar'
+}
 
 
+sessionStorage.removeItem('isEditState')
+
 render(Route)
 
 serviceWorker.unregister()

--
Gitblit v1.8.0