update Time
This commit is contained in:
parent
8c51d57dca
commit
2b98434e90
2 changed files with 4 additions and 2 deletions
|
@ -65,7 +65,7 @@ export const getRelativeTime = timeStamp => {
|
|||
let resStr = '';
|
||||
const dirStr = IS_EARLY ? '前' : '后';
|
||||
// 少于等于59秒
|
||||
if (diff <= 59) resStr = diff + '秒' + dirStr;
|
||||
if (diff <= 59) resStr = parseInt(diff) + '秒' + dirStr;
|
||||
// 多于59秒,少于等于59分钟59秒
|
||||
else if (diff > 59 && diff <= 3599) resStr = Math.floor(diff / 60) + '分钟' + dirStr;
|
||||
// 多于59分钟59秒,少于等于23小时59分钟59秒
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue