将秒转化为时分秒,不满足1小时/1分的话不显示
formatTime: function(second) {
var str, remainder, quotient;
str = "";
if (second == "0") {
return "0秒";
}
rest = parseInt(second);
quotient = parseInt(rest/ 3600);
str += quotient > 0 ? (quotient + "小时") : "";
rest %= 3600;
quotient = parseInt(rest/ 60);
str += quotient > 0 ? (quotient + "分") : "";
rest %= 60;
str += rest > 0 ? (rest + "秒") : "";
return str;
}