From 756444ef2b53f9ba79ccfa59f103a9a6601c2da9 Mon Sep 17 00:00:00 2001 From: Agent Date: Fri, 3 Apr 2026 06:58:31 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=80=E8=B4=A7=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=90=8E=E7=AB=AF=E9=80=80=E6=AC=BE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=81=A2=E5=A4=8D=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/return.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pages/order/return.vue b/src/pages/order/return.vue index 9bc8d95..b873d6b 100644 --- a/src/pages/order/return.vue +++ b/src/pages/order/return.vue @@ -219,15 +219,21 @@ export default { this.returnQty++ } }, - confirmReturn() { + async confirmReturn() { if (this.returnQty <= 0 || this.returnQty > this.currentItem.returnableQty) { uni.showToast({ title: '退货数量无效', icon: 'none' }) return } - uni.showToast({ title: '退货成功', icon: 'success' }) - // TODO: 调用后端创建退货订单 - this.closePopup() - this.loadReturnableGoods() + + try { + await orderApi.refundOrder(this.currentItem.orderId) + uni.showToast({ title: '退货成功', icon: 'success' }) + this.closePopup() + this.loadReturnableGoods() + } catch (e) { + console.error(e) + uni.showToast({ title: e.message || '退货失败', icon: 'none' }) + } } } }