|
|
@@ -910,9 +910,10 @@ export default {
|
|
|
/** 格式化时长 */
|
|
|
formatDuration(seconds) {
|
|
|
if (!seconds) return '00:00:00';
|
|
|
- const hours = Math.floor(seconds / 3600);
|
|
|
- const minutes = Math.floor((seconds % 3600) / 60);
|
|
|
- const secs = seconds % 60;
|
|
|
+ const total = Math.floor(Number(seconds) || 0);
|
|
|
+ const hours = Math.floor(total / 3600);
|
|
|
+ const minutes = Math.floor((total % 3600) / 60);
|
|
|
+ const secs = total % 60;
|
|
|
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
|
|
|
},
|
|
|
/** 更新完课时长设置 */
|