公告删除提示bug修正

This commit is contained in:
hdm 2022-08-24 09:40:11 +08:00
parent 7592e397a6
commit e067cfc876
2 changed files with 4 additions and 4 deletions

View File

@ -120,9 +120,9 @@ class Index extends BaseController
$data['update_time'] = time();
if (Db::name('Note')->update($data) !== false) {
add_log('delete', $id);
return to_assign(1, "删除成功");
return to_assign(0, "删除成功");
} else {
return to_assign(0, "删除失败");
return to_assign(1, "删除失败");
}
}

View File

@ -104,8 +104,8 @@
title: '提示'
}, function(index) {
let callback = function (e) {
layer.msg(res.msg);
if (res.code == 0) {
layer.msg(e.msg);
if (e.code == 0) {
obj.del();
}
}