function dateToTimestamp(date) { //方法一 var newDate = new Date(); newDate.setFullYear(date.substring(0,4)); newDate.setMonth(date.substring(5,7)-1); console.log('3--' + date.substring(8,10)); newDate.setDate(date.substring(8,10)); newDate.setHours(dat…