export function formatTime(time) { function add0(m){return m<10?'0'+m:m } var time = new Date(time * 1000); var y = time.getFullYear(); var m = time.getMonth()+1; var d = time.getDate(); var h = time.getHours(); var mm = time.getMinutes(); var s = time.getSeconds(); return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm); }
10-26
492
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-18
350
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-01
11-07
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-11
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-13
6294
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)