From bac30b4521d2b4fa72151d9278f788120dfffb34 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 30 Sep 2022 16:59:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=85=91=E6=8D=A2=E7=A0=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=88=97=E8=A1=A8)=EF=BC=9A=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A0=81=E6=97=B6=E6=96=B0=E5=A2=9E=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E7=A1=AE=E8=AE=A4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/list/list.js | 42 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js index 9b785877..0775acaf 100644 --- a/src/pages/exchangecode/list/list.js +++ b/src/pages/exchangecode/list/list.js @@ -144,21 +144,33 @@ export default class acclist extends React.Component { /* 删除创建中兑换码 */ deleteCodeFunction(params) { - deleteCode(params.id) - .then((res) => { - handelResponse( - res, - (response, msg) => { - Notify.clear() - Notify.success(msg) - this.getCodeListFn() - }, - (err) => { - Notify.error(err) - } - ) - }) - .catch((err) => {}) + const _self = this + Sweetalert.confirm({ + type: "warning", + closeBtn: true, + title: "确认操作", + content:

是否删除该兑换码?

, + onConfirm() { + deleteCode(params.id) + .then((res) => { + handelResponse( + res, + (response, msg) => { + Notify.clear() + Notify.success(msg) + _self.getCodeListFn() + }, + (err) => { + Notify.error(err) + } + ) + }) + .catch((err) => {}) + }, + onCancel: this.onCancel, + className: "questModal", + parentComponent: this + }) } tabFn(index) {