根据选中时间或者当前时间时间 获取前一个月后一个月等时间
//当前时间的前一个星期
new Date().setDate(new Date().getDate() - 7), new Date().getTime()
//当前时间的前一个月
new Date().setMonth(new Date().getMonth() - 1)
//choiceDate 选中时间(希望获取的时间) choiceDate=2018-05-07 00:00:00
//choiceDateTime 选中时间的毫秒数
let choiceDateStr = choiceDate.replace(/-/g, '/'); //转化为时间格式
let choiceDateTime = new Date(choiceDateStr).getTime();
//选中时间的一个月前
const minTime = new Date(choiceDateTime).setMonth(new Date(choiceDateTime).getMonth() - 1);
//选中时间的一个月后
const maxTime = new Date(choiceDateTime).setMonth(new Date(choiceDateTime).getMonth() + 1);