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) {