js 转换时间
function getDateTime(time, status){
var date = new Date(time);
var d;
# 参数为1时时间精确到时分秒, 参数为2时精确到天
if(status==1){
d = date.getFullYear() + "-" + (Number(date.getMonth())+Number(1)) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
}else if(status==2){
d = date.getFullYear() + "-" + (Number(date.getMonth())+Number(1)) + "-" + date.getDate();
}
return d;
}