4.6测试和视频上传限制25M

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-05-21 18:58:07 +08:00
parent 173e05c13a
commit 4f3989f756
9 changed files with 90 additions and 65 deletions

View File

@@ -71,7 +71,15 @@ function metersToKilometers(input, type) {
}
// 计算路程时间
const calculateDuration = value => (value / 60).toFixed(1) + 'min';
const calculateDuration = seconds => {
if (seconds < 60) return `${seconds}s`;
const minutes = seconds / 60;
if (minutes < 60) return `${Math.floor(minutes)}min`;
else {
const hours = minutes / 60;
return `${hours.toFixed(1).replace(/\.0$/, '')}h`;
}
}
// 计算路程公里数
const calculateDistance = value => (value / 1000).toFixed(1);