| | |
| | | for (let i = 0; i < 6; i++) { |
| | | name.push(_options.substr(Math.floor(Math.random() * 26), 1)) |
| | | } |
| | | name.splice(3, 0, new Date().getTime()) |
| | | return name.join('') |
| | | } |
| | | |
| | |
| | | value = value.replace(/%/ig, ' mpercent ') |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) |
| | | value = value.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | // encode编码(中文字符超出base64加密范围) |
| | | value = window.btoa(window.encodeURIComponent(value)) |
| | |
| | | value = value.replace(/%/ig, ' mpercent ') |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) |
| | | value = value.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | let encodesql = (val) => { |
| | |
| | | if (process.env.NODE_ENV === 'production') { |
| | | baseurl = document.location.origin + '/' + window.GLOB.service |
| | | } else { |
| | | baseurl = window.GLOB.location + window.GLOB.service |
| | | baseurl = window.GLOB.location + '/' + window.GLOB.service |
| | | } |
| | | |
| | | let realurl = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url |