课程详情页

This commit is contained in:
禺狨
2023-06-29 18:59:24 +08:00
parent 3dbf1c081f
commit 58ba3577a8
5 changed files with 272 additions and 3 deletions

View File

@@ -60,3 +60,12 @@ export function studyTimeFormat(dateStr: number) {
value.push(d.seconds());
return value;
}
export function durationFormat(dateStr: number) {
var d = moment.duration(dateStr, "seconds");
let hour = d.hours() === 0 ? "" : d.hours() + ":";
let minute = d.minutes() >= 10 ? d.minutes() + ":" : "0" + d.minutes() + ":";
let second = d.seconds() >= 10 ? d.seconds() : "0" + d.seconds();
return hour + minute + second;
}