fix(order): 提交订单与拉起支付分离,支持取消后二次支付(test-0415 反馈6-3)
- onCreate 旧逻辑:orderCreate 后直接 getOrderPay → requestPayment,强制弹支付 - 现行:orderCreate 成功后 redirectTo /pages/order/order_payment,由用户主动「去支付」 - payment() else 分支同步纠正,避免重复点击「提交订单」时还会绕过支付页直接拉起 - order_payment 自带重试/取消处理,二次支付链路顺畅 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -621,7 +621,11 @@
|
||||
that.onCreate(data);
|
||||
// #endif
|
||||
} else {
|
||||
this.getOrderPay(that.orderNo, '支付成功');
|
||||
// 已经有 orderNo(用户从 confirm 页重复点击):跳转到支付页而非直接拉起(test-0415 反馈6-3)
|
||||
uni.hideLoading();
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/order_payment/index?orderNo=${that.orderNo}&payPrice=${that.orderInfoVo.payFee}`
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
@@ -641,8 +645,16 @@
|
||||
});
|
||||
},
|
||||
onCreate(data) {
|
||||
// test-0415 反馈6-3:提交订单不再强制拉起支付,统一跳转到支付页由用户手动确认
|
||||
// 旧逻辑 createOrder → 立即 requestPayment,取消后留在 confirm 页,二次支付难以触发
|
||||
// 现行:createOrder → 进入 order_payment 页(具备重试与取消处理)
|
||||
let that = this;
|
||||
orderCreate(data).then(res => {
|
||||
this.getOrderPay(res.data.orderNo, '支付成功');
|
||||
this.orderNo = res.data.orderNo;
|
||||
uni.hideLoading();
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/order_payment/index?orderNo=${this.orderNo}&payPrice=${this.orderInfoVo.payFee}`
|
||||
});
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
|
||||
Reference in New Issue
Block a user