fix:修复订单监控总会显示弹窗的bug(采用时间比较形式)
This commit is contained in:
@@ -194,6 +194,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showLoading({
|
||||
title: "处理中"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:428", deviceId.value);
|
||||
const rentResult = await config_user.rentPowerBank(deviceId.value, phoneNumber.value);
|
||||
if (rentResult.code !== 200) {
|
||||
throw new Error(rentResult.msg || "设备租借失败");
|
||||
|
||||
+12
-10
@@ -88,13 +88,14 @@ const _sfc_main = {
|
||||
longitude: location.longitude,
|
||||
latitude: location.latitude
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:260", userLocation.value);
|
||||
try {
|
||||
common_vendor.index.setStorageSync("userLocation", {
|
||||
longitude: location.longitude,
|
||||
latitude: location.latitude
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("warn", "at pages/index/index.vue:267", "缓存基础定位信息失败:", e);
|
||||
common_vendor.index.__f__("warn", "at pages/index/index.vue:268", "缓存基础定位信息失败:", e);
|
||||
}
|
||||
if (!isLocationInitialized.value) {
|
||||
isLocationInitialized.value = true;
|
||||
@@ -115,7 +116,7 @@ const _sfc_main = {
|
||||
district: userLocation.value.district
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("warn", "at pages/index/index.vue:294", "缓存带地址的定位信息失败:", e);
|
||||
common_vendor.index.__f__("warn", "at pages/index/index.vue:295", "缓存带地址的定位信息失败:", e);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -125,7 +126,7 @@ const _sfc_main = {
|
||||
common_vendor.index.hideLoading();
|
||||
}, 800);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:309", "获取位置失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:310", "获取位置失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取位置失败,显示默认地图",
|
||||
icon: "none"
|
||||
@@ -149,15 +150,16 @@ const _sfc_main = {
|
||||
longitude: userLocation.value.longitude
|
||||
}
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:336", res);
|
||||
if (res.statusCode === 200 && res.data.code === 200) {
|
||||
positionList.value = res.data.rows || [];
|
||||
calculateDistances();
|
||||
filteredPositions.value = [...positionList.value];
|
||||
} else {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:341", "获取场地列表失败:", res.data.msg);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:343", "获取场地列表失败:", res.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:344", "获取场地列表异常:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:346", "获取场地列表异常:", error);
|
||||
}
|
||||
};
|
||||
const calculateDistances = async (centerPoint = null) => {
|
||||
@@ -178,7 +180,7 @@ const _sfc_main = {
|
||||
item.distance = formatDistance(distanceInMeters);
|
||||
item.distanceInMeters = distanceInMeters;
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:372", "计算距离异常:", error, item);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:374", "计算距离异常:", error, item);
|
||||
item.distance = "999.0km";
|
||||
item.distanceInMeters = 999e3;
|
||||
}
|
||||
@@ -209,12 +211,12 @@ const _sfc_main = {
|
||||
return !item.distanceInMeters || item.distanceInMeters <= maxDistanceInMeters;
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:413", "根据地图中心加载场地失败:", res.data.msg);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:415", "根据地图中心加载场地失败:", res.data.msg);
|
||||
positionList.value = [];
|
||||
filteredPositions.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:418", "根据地图中心加载场地异常:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:420", "根据地图中心加载场地异常:", error);
|
||||
}
|
||||
};
|
||||
const handleRelocate = async () => {
|
||||
@@ -337,14 +339,14 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:581", "获取设备信息异常:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:583", "获取设备信息异常:", error);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/device/detail?deviceNo=${deviceNo}`
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:588", "扫码处理失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:590", "扫码处理失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "扫码失败",
|
||||
icon: "none"
|
||||
|
||||
Reference in New Issue
Block a user