diff --git a/app/note/controller/Index.php b/app/note/controller/Index.php index 71940a5..a09a2ce 100644 --- a/app/note/controller/Index.php +++ b/app/note/controller/Index.php @@ -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, "删除失败"); } } diff --git a/app/note/view/index/index.html b/app/note/view/index/index.html index 7e662a0..fa34f58 100644 --- a/app/note/view/index/index.html +++ b/app/note/view/index/index.html @@ -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(); } }