用Date()方法将一串数字转化为日期格式输出
<script>
function: date(time) {
var date = new Date(time);
var Y = date.getFullYear();
var M = (date.getMonth() + 1);
var D = date.getDate();
M = M > 10 ? M : '0' + M;
D = D > 10 ? D : '0' + D;
return Y + '-' + M + '-' + D;
}
var time = detailView.date('1555384885861');
// 参数是传入一串数字
</script>