获取当前年份、月份
let date = new Date() let currentYear = date.getFullYear() //获取完整的年份(4位) let currentMonth = date.getMonth() + 1 //获取当前月份(1-12,1代表1月) currentMonth = currentMonth >= 10 ? currentMonth : "0" + currentMonth