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