export default class Utils { constructor () { } /** * @description 获取当前时间 */ static getCurrentTime () { let _date = new Date() let month = _date.getMonth() + 1 let day = _date.getDate() let hour = _date.getHours() let minute = _date.getMinutes() let second = _date.getSeconds() return `${_date.getFullYear()}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day} ${hour < 10 ? '0' + hour : hour}:${minute < 10 ? '0' + minute : minute}:${second < 10 ? '0' + second : second}.000` } /** * @description 获取uuid */ static getuuid () { let uuid = [] let _options = '0123456789abcdefghigklmnopqrstuv' for (let i = 0; i < 32; i++) { uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) } return uuid.join('') } }