mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-17 06:32:51 +00:00
fix: 定位签到失败的问题
This commit is contained in:
parent
bbf9107560
commit
7dd5baa9ec
@ -527,7 +527,7 @@ class BaiduMapPicker {
|
|||||||
// 按距离排序(如果有距离信息)
|
// 按距离排序(如果有距离信息)
|
||||||
pois.sort((a, b) => {
|
pois.sort((a, b) => {
|
||||||
if (a.distance_current && b.distance_current) {
|
if (a.distance_current && b.distance_current) {
|
||||||
return $A.sortFloat(a.distance_current, b.distance_current);
|
return this.sortFloat(a.distance_current, b.distance_current);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
@ -564,6 +564,17 @@ class BaiduMapPicker {
|
|||||||
}, 100); // 添加小延时确保DOM已更新
|
}, 100); // 添加小延时确保DOM已更新
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算排序值 (数字格式)
|
||||||
|
* @param v1
|
||||||
|
* @param v2
|
||||||
|
* @returns {number}
|
||||||
|
*/
|
||||||
|
sortFloat(v1, v2) {
|
||||||
|
if (v1 === v2) return 0;
|
||||||
|
return (parseFloat(v1) || 0) - (parseFloat(v2) || 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换距离显示
|
* 转换距离显示
|
||||||
* @param d
|
* @param d
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user