timestampToTime(timestamp, state) { var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 var YM = (date.getMonth() + 1).toString(); var Y = date.getFullYear() + '-'; var M = (date.getMonth() + 1).toString().padStart(2, 0) + '-'; var D = date .getDate() .toString() .padStart(2, 0) + ' '; var h = date .getHours() .toString() .padStart(2, 0) + ':'; var m = date .getMinutes() .toString() .padStart(2, 0) + ':'; var s = date .getSeconds() .toString() .padStart(2, 0); return state ? Y + M + D + h + m + s : Y + M + D; },
var startTime = this.timestampToTime(this.cancelTime[0], true);
var endTime = this.timestampToTime(this.cancelTime[1], true);