| | |
| | | |
| | | export default class Utils { |
| | | /** |
| | | * @description 数据源名称,用于统一查询 |
| | | * @return {String} name |
| | | */ |
| | | static getdataName () { |
| | | let name = [] |
| | | let _options = 'abcdefghigklmnopqrstuvwxyz' |
| | | for (let i = 0; i < 6; i++) { |
| | | name.push(_options.substr(Math.floor(Math.random() * 26), 1)) |
| | | } |
| | | return name.join('') |
| | | } |
| | | |
| | | /** |
| | | * @description 生成32位uuid string + 时间 |
| | | * @return {String} uuid |
| | | */ |
| | |
| | | /** |
| | | * @description sql加密 |
| | | * @return {String} value |
| | | * @return {Boolean} isUnFormat // 是否为解密 |
| | | */ |
| | | static formatOptions (value, isUnFormat = false) { |
| | | if (!value) return '' |