feat: 添加订单支付和成功页面,更新订单状态逻辑
新增了订单支付页面和支付成功页面,分别用于处理用户的支付流程和展示支付结果。同时,更新了订单状态的逻辑,确保在订单列表中正确显示各个状态。调整了设备租借逻辑,优化了扫码处理流程,提升用户体验。
This commit is contained in:
@@ -29,24 +29,26 @@
|
||||
await wxLogin();
|
||||
}
|
||||
|
||||
const result = await queryHasOrder(option.deviceNo);
|
||||
uni.hideLoading();
|
||||
|
||||
if (!option.deviceNo) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '设备编号不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 查询用户是否有使用中(in_used)的订单
|
||||
const result = await queryHasOrder(option.deviceNo);
|
||||
uni.hideLoading();
|
||||
|
||||
if (result.data.length != 0) {
|
||||
// 如果有未完成订单,直接跳转到归还页面
|
||||
if (result.data && result.data.data && result.data.data.length > 0) {
|
||||
// 如果有使用中的订单,直接跳转到归还页面
|
||||
uni.redirectTo({
|
||||
url: `/pages/device/return?deviceNo=${option.deviceNo}`
|
||||
});
|
||||
} else {
|
||||
// 如果没有未完成订单,跳转到设备详情页面进行租借
|
||||
// 如果没有使用中的订单,跳转到设备详情页面进行租借
|
||||
uni.redirectTo({
|
||||
url: `/pages/device/detail?deviceNo=${option.deviceNo}`
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user