feat: 提示优化

This commit is contained in:
苟川东 2025-04-28 16:16:18 +08:00
parent eb1b1d3e09
commit 0050d4989a
2 changed files with 11 additions and 4 deletions

View File

@ -195,7 +195,14 @@ const arrivedOnSite = () => {
let distances = helpers.getDistances(res.latitude, res.longitude, data.value.order_info.lat, data.value.order_info.lng);
if (envVersion === 'release' && (distances.unit === '公里' || distances.distance > 500)) {
return helpers.showToast(`上门失败!距离客户地址超过 500 米,当前距离:${distances.distance}${distances.unit}`)
uni.showModal({
title: '上门失败',
showCancel: false,
content: `距离客户地址超过 500 米,当前距离:${distances.distance}${distances.unit}`,
success: function (res) {
}
});
return
}
helpers.jumpToPage('arrived-on-site', 'id=' + id.value)

View File

@ -50,13 +50,13 @@ class helpers {
}
static showToast(msg) {
let duration = 1500
let duration = 2000
if (msg.length > 7) {
duration = 2000
duration = 3000
}
if (msg.length > 14) {
duration = 4000
duration = 5000
}
uni.showToast({