修改临停订单,只要没有支付成功都删除该订单

This commit is contained in:
赵毅 2025-09-13 10:32:03 +08:00
parent 9ae7f9e088
commit f767c7109b

View File

@ -402,14 +402,23 @@ export default {
}, },
fail: (payErr) => { fail: (payErr) => {
const params = {
order_id: resVal.order_id
}
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
})
uni.showToast({ uni.showToast({
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败', title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
icon: 'none' icon: 'none'
}) })
//
} }
}) })
} else { } else {
const params = {
order_id: resVal.order_id
}
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
})
console.error("获取支付参数失败,缺少必要参数") console.error("获取支付参数失败,缺少必要参数")
uni.showToast({ uni.showToast({
title: '获取支付信息失败', title: '获取支付信息失败',
@ -417,6 +426,13 @@ export default {
}) })
} }
}) })
}).catch(error => {
console.log("111"); // 111
console.error("创建临时停车订单失败", error);
uni.showToast({
title: '创建订单失败',
icon: 'none'
})
}) })
}, },
// //