feat: 足额免配送费

This commit is contained in:
Kroytz committed 2026-07-16 00:22:26 +08:00
1 parent be9601ff91
commit 2aa950e5f4
14 files changed
+72 -9

No files matched your search

@@ -163,7 +163,7 @@ const amount = computed(() =>{
})
// 选地址/切换外卖后预估配送费(基于收货地址距离匹配配送规则)
watch([address, store, orderType], async () => {
watch([address, store, orderType, total], async () => {
if (orderType.value !== 'takeout' || !store.value.id) {
deliveryFee.value = 0
outOfRange.value = false
@@ -183,7 +183,8 @@ watch([address, store, orderType], async () => {
const res = await getDeliveryFee({
shopId: store.value.id,
lng: address.value.longitude,
lat: address.value.latitude
lat: address.value.latitude,
amount: total.value.toFixed(2)
})
outOfRange.value = !!res.outOfRange
deliveryFee.value = parseFloat(res.deliveryPrice) || 0