feat(兑换码管理列表):删除兑换码时新增提示确认框

This commit is contained in:
wangsongsole 2022-09-30 16:59:40 +08:00
parent 5c98718be5
commit bac30b4521
1 changed files with 27 additions and 15 deletions

View File

@ -144,6 +144,13 @@ export default class acclist extends React.Component {
/* 删除创建中兑换码 */ /* 删除创建中兑换码 */
deleteCodeFunction(params) { deleteCodeFunction(params) {
const _self = this
Sweetalert.confirm({
type: "warning",
closeBtn: true,
title: "确认操作",
content: <p>是否删除该兑换码</p>,
onConfirm() {
deleteCode(params.id) deleteCode(params.id)
.then((res) => { .then((res) => {
handelResponse( handelResponse(
@ -151,7 +158,7 @@ export default class acclist extends React.Component {
(response, msg) => { (response, msg) => {
Notify.clear() Notify.clear()
Notify.success(msg) Notify.success(msg)
this.getCodeListFn() _self.getCodeListFn()
}, },
(err) => { (err) => {
Notify.error(err) Notify.error(err)
@ -159,6 +166,11 @@ export default class acclist extends React.Component {
) )
}) })
.catch((err) => {}) .catch((err) => {})
},
onCancel: this.onCancel,
className: "questModal",
parentComponent: this
})
} }
tabFn(index) { tabFn(index) {