From e067cfc87686495698b008f9e29c3bdab14f76ae Mon Sep 17 00:00:00 2001 From: hdm Date: Wed, 24 Aug 2022 09:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E5=88=A0=E9=99=A4=E6=8F=90?= =?UTF-8?q?=E7=A4=BAbug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/note/controller/Index.php | 4 ++-- app/note/view/index/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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(); } }