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,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: <p>是否删除该兑换码</p>,
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) {