修改临停订单,只要没有支付成功都删除该订单
This commit is contained in:
parent
9ae7f9e088
commit
f767c7109b
@ -402,14 +402,23 @@ export default {
|
||||
|
||||
},
|
||||
fail: (payErr) => {
|
||||
const params = {
|
||||
order_id: resVal.order_id
|
||||
}
|
||||
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
|
||||
})
|
||||
uni.showToast({
|
||||
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
// 支付完成后的回调,无论成功失败都会执行
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const params = {
|
||||
order_id: resVal.order_id
|
||||
}
|
||||
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
|
||||
})
|
||||
console.error("获取支付参数失败,缺少必要参数")
|
||||
uni.showToast({
|
||||
title: '获取支付信息失败',
|
||||
@ -417,6 +426,13 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(error => {
|
||||
console.log("111"); // 请求创建订单失败时输出111
|
||||
console.error("创建临时停车订单失败", error);
|
||||
uni.showToast({
|
||||
title: '创建订单失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取车辆列表
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user