mirror of
https://github.com/PlayEdu/backend
synced 2025-06-28 03:55:02 +08:00
时间渲染为空时显示优化
This commit is contained in:
parent
e7a63c350f
commit
2afada157d
@ -13,10 +13,16 @@ export function clearToken() {
|
||||
}
|
||||
|
||||
export function dateFormat(dateStr: string) {
|
||||
if (!dateStr) {
|
||||
return "-";
|
||||
}
|
||||
return moment(dateStr).format("YYYY-MM-DD HH:mm");
|
||||
}
|
||||
|
||||
export function timeFormat(dateStr: number) {
|
||||
if (!dateStr) {
|
||||
return "-";
|
||||
}
|
||||
var d = moment.duration(dateStr, "seconds");
|
||||
let value =
|
||||
Math.floor(d.asDays()) +
|
||||
@ -117,4 +123,4 @@ export function ValidataCredentials(value: any) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user