Commit faba9362 by 冷斌

fix bug

parent d52f4d6d
...@@ -208,16 +208,15 @@ ...@@ -208,16 +208,15 @@
var o = { var o = {
"M+": this.getMonth() + 1, //月份 "M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日 "d+": this.getDate(), //日
"h+": this.getHours(), //小时 "H+": this.getHours(), //小时
"m+": this.getMinutes(), //分 "m+": this.getMinutes(), //分
"s+": this.getSeconds() //秒 "s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
}; };
if (/(y+)/.test(fmt)) { //根据y的长度来截取年 if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o)
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
return fmt; return fmt;
} }
...@@ -414,7 +413,7 @@ ...@@ -414,7 +413,7 @@
id: r.exams_paper_id, id: r.exams_paper_id,
title: r.paper_info.exams_paper_title, title: r.paper_info.exams_paper_title,
price: r.paper_info.price, price: r.paper_info.price,
time: new Date(r.update_time * 1000).format('yyyy-mm-dd HH:MM:ss'), time: new Date(r.update_time * 1000).Format('yyyy-mm-dd HH:MM:ss'),
score: r.score score: r.score
} }
})) }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment