From f248207e3cb568b3d1f1e5be07a92dc915e89731 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:28:51 +0800
Subject: [PATCH] 2022-08-02

---
 public/options.json                                 |   14 +++++++-------
 src/index.js                                        |    2 +-
 src/templates/zshare/modalform/index.jsx            |    2 +-
 src/views/design/index.jsx                          |    3 ++-
 src/templates/zshare/modalform/fieldtable/index.jsx |   11 ++++++++++-
 src/api/index.js                                    |   11 +++++++++++
 6 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/public/options.json b/public/options.json
index 523da64..6595475 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,20 +1,20 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
-  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
+  "mainSystemApi": "https://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "mkindustry",
   "defaultLang": "zh-CN",
-  "WXAppID": "",
+  "WXAppID": "wx4d8a34c8d4494872",
   "WXminiAppID": "",
   "debugger": false,
   "licenseKey": "",
   "probation": "",
   "keepPassword": "true",
   "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/api/index.js b/src/api/index.js
index 3fce8f4..74c1c5b 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -144,6 +144,17 @@
     if (process.env.NODE_ENV === 'production') {
       _url = document.location.origin + '/' + url
     }
+    if (/^http:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) {
+      _url = window.GLOB.location + ':8080/' + url
+      if (process.env.NODE_ENV === 'production') {
+        _url = document.location.origin + ':8080/' + url
+      }
+    } else if (/^https:\/\/(qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn)/.test(_url)) {
+      _url = window.GLOB.location + ':8443/' + url
+      if (process.env.NODE_ENV === 'production') {
+        _url = document.location.origin + ':8443/' + url
+      }
+    }
     
     if (param) {
       return axios({
diff --git a/src/index.js b/src/index.js
index f1ea5de..215706f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -106,7 +106,7 @@
 
       // GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars'
 
-      GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars'
+      GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars'
 
       if (GLOB.watermark) {
         GLOB.dataFormat = true
diff --git a/src/templates/zshare/modalform/fieldtable/index.jsx b/src/templates/zshare/modalform/fieldtable/index.jsx
index b340337..d9100da 100644
--- a/src/templates/zshare/modalform/fieldtable/index.jsx
+++ b/src/templates/zshare/modalform/fieldtable/index.jsx
@@ -11,7 +11,6 @@
 
 class EdiFieldsTable extends Component {
   static propTpyes = {
-    dict: PropTypes.object,         // 瀛楀吀椤�
     onChange: PropTypes.func        // 鏁版嵁鍙樺寲
   }
 
@@ -118,6 +117,16 @@
         this.setState({loading: false})
       })
       return
+    } else if (fields.filter(f => f.toLowerCase() === 'value').length > 0) {
+      notification.warning({
+        top: 92,
+        message: '瀛楁鍚嶄笉鍙娇鐢╲alue锛�',
+        duration: 5
+      })
+      this.setState({loading: true}, () => {
+        this.setState({loading: false})
+      })
+      return
     }
 
     this.setState({ data }, () => {
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index d0eaccd..da963fa 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -669,7 +669,7 @@
           { required: item.required, message: '璇锋坊鍔�' + item.label + '!' }
         ]
 
-        content = <FieldsTable dict={this.props.dict} onChange={this.changeField}/>
+        content = <FieldsTable onChange={this.changeField}/>
       } else if (item.type === 'color') {
         className = 'color-form-item'
         rules = [
diff --git a/src/views/design/index.jsx b/src/views/design/index.jsx
index e995f61..d596e2f 100644
--- a/src/views/design/index.jsx
+++ b/src/views/design/index.jsx
@@ -22,6 +22,7 @@
     if (window.GLOB.systemType !== 'production' && window.GLOB.WXAppID && !sessionStorage.getItem('wxTemplates')) {
       Api.wxAccessToken().then(res => {
         let wxtoken = res.oa_access_token || ''
+        wxtoken = '59_DH0hrAp0B8jtdJvU-7BV_-nG01qh2rUU1L8ihj-2pMWlUFLE2eEtVv4zZYAUIKcxCit4SgOTwxvUGdYHltaha3RmgnZqkQSgkxXRm9hz18kGbGhMc5r11W5Iv9Xr50Pz-Sz7FUVHCM-6GZLXJPIjAIAVBU'
         let minitoken = res.mini_access_token || ''
   
         if (wxtoken) {
@@ -29,7 +30,7 @@
             if (res.template_list) {
               let temps = res.template_list.filter(item => item.primary_industry)
               sessionStorage.setItem('wxTemplates', JSON.stringify(temps))
-            } else {
+            } else if (res.errcode === 0) {
               sessionStorage.setItem('wxTemplates', JSON.stringify([]))
             }
           })

--
Gitblit v1.8.0