// 时间戳转换,前提是时间戳以毫秒为单位 function formatDate(v) { var d = new Date(v); var year = d.getFullYear(); var month = d.getMonth() + 1; var date = d.getDate(); var hour = d.getHours(); var minute = d.getMinutes(); var second = d.getSeconds(); return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; }