| | |
| | | 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位uuid string + 时间 |
| | |
| | | {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') { |
| | |
| | | |
| | | 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/' |
| | |
| | | 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 |
| | |
| | | /* 同类数据验证 */ |
| | | 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 |
| | | ` |