export let tempToTime = ($secs) => {
if ($secs) {
$secs = $secs/1000;
let $result = '';
if ($secs >= 86400) {
let $days = Math.floor($secs / 86400);
$secs = $secs % 86400;
$result = $days + ' 天';
if ($secs > 0) {
$result += ' ';
}
}
if ($secs >= 3600) {
let $hours = Math.floor($secs / 3600);
$secs = $secs % 3600;
$result += $hours + ' 小时';
if ($secs > 0) {
$result += ' ';
}
}
if ($secs >= 60) {
let $minutes = Math.floor($secs / 60);
$secs = $secs % 60;
$result += $minutes + ' 分钟';
if ($secs > 0) {
$result += ' ';
}
}
$result += parseInt($secs) + ' 秒';
return $result;
}
return "";
}