From 054754f66cf8109f8286dfcb9a55980527dcc45b Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 21 Nov 2019 20:24:02 +0800 Subject: [PATCH] =?UTF-8?q?user=5Ftoken=20=E5=A2=9E=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/UserModel.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Model/UserModel.class.php b/Application/Admin/Model/UserModel.class.php index 1b24f709..e55f9c2c 100644 --- a/Application/Admin/Model/UserModel.class.php +++ b/Application/Admin/Model/UserModel.class.php @@ -1121,6 +1121,13 @@ class UserModel extends Model{ ]); if (!$r) { M('user_token','tab_')->rollback(); + $msg = array( + "status" => 5, + "return_code" => 5, + "return_msg" => "数据出错", + "msg" => '1' + ); + echo base64_encode(json_encode($msg)); exit(); } @@ -1132,8 +1139,15 @@ class UserModel extends Model{ 'login_cnt' => $userTokens['login_cnt'] + 1, 'update_time' => time() ]); - if (!$r) { + if ($r === false) { M('user_token','tab_')->rollback(); + $msg = array( + "status" => 5, + "return_code" => 5, + "return_msg" => "数据出错2", + "msg" => '1' + ); + echo base64_encode(json_encode($msg)); exit(); } } else { @@ -1145,7 +1159,7 @@ class UserModel extends Model{ 'login_cnt' => $userTokens['login_cnt'] + 1, 'update_time' => time() ]); - if (!$r) { + if ($r === false) { M('user_token','tab_')->rollback(); exit(); }