js转换后台接受的日期格式
var html = "--";
if(data.createTime!=null&&data.createTime!=""){
Date.prototype.toLocaleString = function() {
return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate() ;
};
var unixTimestamp = new Date(data.createTime) ;
commonTime = unixTimestamp.toLocaleString();
html=commonTime;
}
return html;
友情链接:https://www.cnblogs.com/zhanghaoliang/p/5997619.html