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) { deleteCodeFunction(params) {
deleteCode(params.id) const _self = this
.then((res) => { Sweetalert.confirm({
handelResponse( type: "warning",
res, closeBtn: true,
(response, msg) => { title: "确认操作",
Notify.clear() content: <p>是否删除该兑换码</p>,
Notify.success(msg) onConfirm() {
this.getCodeListFn() deleteCode(params.id)
}, .then((res) => {
(err) => { handelResponse(
Notify.error(err) res,
} (response, msg) => {
) Notify.clear()
}) Notify.success(msg)
.catch((err) => {}) _self.getCodeListFn()
},
(err) => {
Notify.error(err)
}
)
})
.catch((err) => {})
},
onCancel: this.onCancel,
className: "questModal",
parentComponent: this
})
} }
tabFn(index) { tabFn(index) {