From 24f0ce147c8daef39ec437d5def9d089ea5b1839 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 05 六月 2020 17:23:53 +0800
Subject: [PATCH] 2020-06-05

---
 src/utils/utils.js |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 5dc693e..8b14dfd 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -2,8 +2,6 @@
 import md5 from 'md5'
 import options from '@/store/options.js'
 
-const service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
-
 export default class Utils {
   /**
    * @description 鐢熸垚32浣島uid string + 鏃堕棿
@@ -67,10 +65,10 @@
       {key: 'alter', reg: /(^|\s)alter\s/ig},
       {key: 'truncate', reg: /(^|\s)truncate\s/ig},
       {key: 'if', reg: /(^|\s)if\s/ig},
-      {key: 'exec', reg: /exec/ig},
-      {key: 'OBJECT', reg: /object/ig},
-      {key: 'sys.', reg: /sys\./ig},
-      {key: 'kill', reg: /kill/ig}
+      {key: 'exec', reg: /(^|\s)exec(\s|\()/ig},
+      {key: 'OBJECT', reg: /(^|\s)object(\s|\()/ig},
+      {key: 'sys.', reg: /(^|\s)sys\./ig},
+      {key: 'kill', reg: /(^|\s)kill\s/ig}
     ]
 
     if (type === 'customscript') {
@@ -553,9 +551,9 @@
 
     let baseurl = ''
     if (process.env.NODE_ENV === 'production') {
-      baseurl = document.location.origin + '/' + service
+      baseurl = document.location.origin + '/' + window.GLOB.service
     } else {
-      baseurl = 'http://qingqiumarket.cn/' + service
+      baseurl = window.GLOB.location + window.GLOB.service
     }
     // if (!/Content\/images\/upload\//.test(url)) {
     //   baseurl = baseurl + 'Content/images/upload/'
@@ -576,7 +574,7 @@
     if (options.cloudServiceApi) {
       baseurl = options.cloudServiceApi.replace(/webapi(.*)$/, '')
     } else {
-      baseurl = document.location.origin + '/' + service
+      baseurl = document.location.origin + '/' + window.GLOB.service
     }
 
     return url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
@@ -1141,11 +1139,11 @@
         /* 鍚岀被鏁版嵁楠岃瘉 */
         Set @tbid=''
 
-        Select top 1 @tbid='X' from (select ${item.field}${_primaryKey},1 an n from ${datasource} ) tb  inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID group by ${item.field} having sum(n)>1
+        Select top 1 @tbid='X' from (select ${item.field}${_primaryKey},1 as n from ${datasource} ) tb  inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID group by ${item.field} having sum(n)>1
         
         If @tbid!=''
         Begin
-          Set @errorcode='E' ,Set @remsg='${item.fieldlabel} 鍊间笉鍞竴'
+          Set @ErrorCode='E' Set @retmsg='${item.fieldlabel} 鍊间笉鍞竴'
           goto aaa
         end
         `

--
Gitblit v1.8.0