From b476305e302d2b42868e84593a508cdfc84554d8 Mon Sep 17 00:00:00 2001 From: Lcp <2767378157@qq.com> Date: Sun, 29 Sep 2024 16:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E7=A1=AE=E8=AE=A4=E6=94=B6=E8=B4=A7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/detail.vue | 19 ++++++++++++++----- pages/order/list.vue | 21 +++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/pages/order/detail.vue b/pages/order/detail.vue index 4e0514de..0e716c48 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -341,11 +341,20 @@ return; } - // 正常的确认收货流程 - const { code } = await OrderApi.receiveOrder(orderId); - if (code === 0) { - await getOrderDetail(orderId); - } + uni.showModal({ + title: '提示', + content: '确认收货吗?', + success: async function (res) { + if (!res.confirm) { + return; + } + // 正常的确认收货流程 + const { code } = await OrderApi.receiveOrder(orderId); + if (code === 0) { + await getOrderDetail(orderId); + } + }, + }); } // #ifdef MP-WEIXIN diff --git a/pages/order/list.vue b/pages/order/list.vue index 926ecfde..fc02fedc 100644 --- a/pages/order/list.vue +++ b/pages/order/list.vue @@ -223,12 +223,21 @@ return; } - // 正常的确认收货流程 - const { code } = await OrderApi.receiveOrder(order.id); - if (code === 0) { - resetPagination(state.pagination); - await getOrderList(); - } + uni.showModal({ + title: '提示', + content: '确认收货吗?', + success: async function (res) { + if (!res.confirm) { + return; + } + // 正常的确认收货流程 + const { code } = await OrderApi.receiveOrder(order.id); + if (code === 0) { + resetPagination(state.pagination); + await getOrderList(); + } + }, + }); } // #ifdef MP-WEIXIN