fix:修复订单监控总会显示弹窗的bug(采用时间比较形式)
This commit is contained in:
+8
-6
@@ -369,13 +369,15 @@ function getUserLocation() {
|
||||
common_vendor.wx$1.getLocation({
|
||||
type: "gcj02",
|
||||
success: (res) => {
|
||||
const longitude = parseFloat(res.longitude.toFixed(5));
|
||||
const latitude = parseFloat(res.latitude.toFixed(5));
|
||||
resolve({
|
||||
longitude: res.longitude,
|
||||
latitude: res.latitude
|
||||
longitude,
|
||||
latitude
|
||||
});
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("error", "at utils/mapUtils.js:423", "获取位置失败:", error);
|
||||
common_vendor.index.__f__("error", "at utils/mapUtils.js:427", "获取位置失败:", error);
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
@@ -410,7 +412,7 @@ function getRegeo(longitude, latitude) {
|
||||
});
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("error", "at utils/mapUtils.js:462", "逆地理编码失败:", error);
|
||||
common_vendor.index.__f__("error", "at utils/mapUtils.js:484", "逆地理编码失败:", error);
|
||||
reject({ success: false, message: error.message || "逆地理编码失败" });
|
||||
}
|
||||
});
|
||||
@@ -428,8 +430,8 @@ function testDistanceCalculation() {
|
||||
const tiananmen = { lat: 39.908823, lng: 116.39747 };
|
||||
const gugong = { lat: 39.916527, lng: 116.397128 };
|
||||
const distance = calculateDistanceSync(tiananmen.lat, tiananmen.lng, gugong.lat, gugong.lng);
|
||||
common_vendor.index.__f__("log", "at utils/mapUtils.js:586", "天安门到故宫的距离:", distance, "米");
|
||||
common_vendor.index.__f__("log", "at utils/mapUtils.js:587", "转换为公里:", (distance / 1e3).toFixed(2), "公里");
|
||||
common_vendor.index.__f__("log", "at utils/mapUtils.js:608", "天安门到故宫的距离:", distance, "米");
|
||||
common_vendor.index.__f__("log", "at utils/mapUtils.js:609", "转换为公里:", (distance / 1e3).toFixed(2), "公里");
|
||||
return distance;
|
||||
}
|
||||
exports.calculateDistanceSync = calculateDistanceSync;
|
||||
|
||||
Reference in New Issue
Block a user