jinhui.wang

错误提示修正

......@@ -192,14 +192,16 @@ export default {
showCancelButton: true,
type: "warning",
})
.then(function () {
return delFlightId(id);
.then(()=> {
delFlightId(id)
.then((res) => {
this.$message({
message: res.msg,
type: res.code === 200 ? "success" : "warning",
});
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
.catch(() => {});
})
.catch(function () {});
}
},
//启用,停用
......@@ -210,18 +212,17 @@ export default {
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return enableOrDisable(id, status);
})
.then((res) => {
if (res.code != 200){
.then(()=> {
enableOrDisable(id, status).then((res) => {
if (res.code != 200) {
this.msgError(res.msg);
}else {
} else {
this.getList();
this.msgSuccess(tip + "成功");
}
})
.catch(function () {});
.catch(()=> {});
})
},
},
created() {
......