// const getBase64 = (url, ext, callback) => { // let canvas = document.createElement('canvas') // const ctx = canvas.getContext('2d') // const img = new window.Image() // img.crossOrigin = 'Anonymous' // img.src = url // img.onload = function() { // canvas.height = 60 // canvas.width = 85 // ctx.drawImage(img, 0, 0, 60, 85) // const dataURL = canvas.toDataURL('image/' + ext) // callback.call(this, dataURL) // 回掉函数获取Base64编码 // canvas = null // } // } // // getBase64('https://minio.xxx.com:9001/tenant-9999/v2-db4968b9166990ca91ed7751ac19afdd_r_20231113152749A010.webp', 'webp', (res) => { // console.log('res', res) // }) // SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//根据自己情况 // String date="2019-07-26 15:21:00"; // Date dd=sdf.parse(date); //String转Date // const date = new Date('2019-07-26 15:21:00') // console.log(date.getHours()) // console.log(date.getSeconds()) // // const dateY = new Date('2012-2-2 08:54:32') // console.log('指定时间', dateY) // Thu Feb 02 2012 08:54:32 GMT+0800 (中国标准时间) // import moment from 'moment/moment' import moment from 'moment' console.log('--', new Date('2023-12-11 03:00:99')) console.log('--', new Date()) console.log('2023-10-24T16:00:00.000Z', moment('2023-10-24T16:00:00.000Z').format('yyyy-MM-DD'))