isDuringDateFun(beginDateStr, endDateStr) {
// 判断当前时间 是否在一个时间段中
let curDate = moment().format('LTS')
if (curDate >= beginDateStr && curDate <= endDateStr) {
return true;
}
return false;
},
方法接受两个参数,开始时间和结束时间,使用了moment()方法确定当前时间格式(‘HH:mm:ss’)