From be8f81fe2eb52e841efead8586e514842471e0ba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 九月 2023 16:50:35 +0800
Subject: [PATCH] 2023-09-14

---
 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
index 2f679b7..de51194 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -173,7 +173,7 @@
     _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp)
     _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉
     
-    Api.getSystemConfig(_sParam).then(res => {
+    Api.getCloudConfig(_sParam).then(res => {
       if (res.status) {
         let _scripts = res.data.map(item => {
           return {
@@ -265,6 +265,13 @@
         duration: 5
       })
       return
+    } else if (/,,/ig.test(values.sql)) {
+      notification.warning({
+        top: 92,
+        message: '鑷畾涔塻ql璇彞涓紝涓嶅彲鍑虹幇杩炵画鐨勮嫳鏂囬�楀彿锛�,,锛�',
+        duration: 5
+      })
+      return
     }
 
     let error = Utils.verifySql(values.sql, 'customscript')
@@ -307,7 +314,7 @@
     
     this.setState({loading: true})
     Api.genericInterface(param).then(result => {
-      if (result.status) {
+      if (result.status || result.ErrCode === '-2') {
         this.setState({
           loading: false,
           scripts: _scripts,
@@ -439,7 +446,7 @@
             </Col>
             <Col span={20}>
               <Form.Item labelCol={{span: 4}} wrapperCol={{span: 20}} label={'鎶ラ敊瀛楁'} style={{margin: 0}}>
-                ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg
+                ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT銆丆NT銆�-2NT锛�, retmsg
               </Form.Item>
             </Col>
             <Col span={24} className="sqlfield">

--
Gitblit v1.8.0