Browse Source

🐞 fix: 解决精度带来的距离问题

Pchen0 4 weeks ago
parent
commit
bcc79875ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugin/Lepao/Path.js

+ 1 - 1
plugin/Lepao/Path.js

@@ -81,7 +81,7 @@ function selectCheckpoints(path, checkpoints, runLogNum, pointUpdateDistance, lo
                 console.log(`选中打卡点 ${cp.id} ${cp.address},距离:${dist}`)
                 results.push({
                     point_id: cp.id,
-                    distance: +(totalDistance / 1000).toFixed(2),
+                    distance: (totalDistance / 1000).toFixed(2),
                     longitude: p.o,
                     longtitude: p.o, // 保留原字段
                     latitude: p.a,