function getDefaultTime() {
const date = new Date()
// 获取开始日期
const startDate = new Date(date.getTime() - 6 * 24 * 60 * 60 * 1000)
const startYear = startDate.getFullYear()
let startMonth = startDate.getMonth() + 1
startMonth = startMonth <= 9 ? '0' + startMonth : startMonth
let startDay = startDate.getDate()
startDay = startDay <= 9 ? '0' + startDay : startDay
// 结束日期
const year = date.getFullYear()
let month = date.getMonth() + 1
let strDate = date.getDate()
if (month >= 1 && month <= 9) {
month = '0' + month
}
if (strDate >= 0 && strDate <= 9) {
strDate = '0' + strDate
}
return [startYear + '-' + startMonth + '-' + startDay, year + '-' + month + '-' + strDate]
}