提交 99759b5a 编写于 作者: H HFO4

Fix #35

上级 d58b824d
...@@ -25,25 +25,10 @@ ...@@ -25,25 +25,10 @@
} }
return parseInt(size * 100) / 100 + filetype[i]; return parseInt(size * 100) / 100 + filetype[i];
} }
Date.prototype.format = function(fmt) { function formateDate(dateString){
var o = { var bigDate = dateString.split(" ");
"M+": this.getMonth() + 1, var smallDate = bigDate[0].split("-");
"d+": this.getDate(), return smallDate[0]+""+smallDate[1]+""+smallDate[2]+""+bigDate[1];
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S": this.getMilliseconds()
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
}
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)));
}
}
return fmt;
} }
function audioPause() { function audioPause() {
...@@ -53,7 +38,7 @@ ...@@ -53,7 +38,7 @@
$("#size").html(getSize(shareInfo.fileSize)); $("#size").html(getSize(shareInfo.fileSize));
$("#down_num").html(shareInfo.downloadNum); $("#down_num").html(shareInfo.downloadNum);
$("#view_num").html(shareInfo.ViewNum); $("#view_num").html(shareInfo.ViewNum);
shareTime = new Date(shareInfo.shareDate).format("yyyy年MM月dd日 hh:mm"); shareTime = formateDate(shareInfo.shareDate);
$("#share_time").html(shareTime); $("#share_time").html(shareTime);
$("#download").click(function() { $("#download").click(function() {
$.post("/Share/getDownloadUrl", { $.post("/Share/getDownloadUrl", {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册