From 06405ca0e1cd2b4102af47c107b5b17ad0e10d2c Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Mon, 15 Aug 2022 13:57:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4=E6=8E=A5?= =?UTF-8?q?=E5=BE=85=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/customer.vue | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pages/index/customer.vue b/pages/index/customer.vue index 01ab760..0ca17f1 100644 --- a/pages/index/customer.vue +++ b/pages/index/customer.vue @@ -135,16 +135,24 @@ methods: { // 删除接待 deleteReception(data) { - this.$u.get(`/customer/delete?id=${data.id}`).then(res => { - if (!res) { - this.init() + uni.showModal({ + content: `确认删除“${data.name}”接待吗?`, + cancelColor: "#999999", + success: res => { + if (res.confirm) { + this.$u.get(`/customer/delete?id=${data.id}`).then(res => { + if (!res) { + this.init() + } + }).catch(e => { + console.log(e) + uni.showToast({ + title: '网络异常,请稍后重试~', + icon: 'none' + }); + }) + } } - }).catch(e => { - console.log(e) - uni.showToast({ - title: '网络异常,请稍后重试~', - icon: 'none' - }); }) }, // 获取未读消息数量