4.6测试和视频上传限制25M
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user