From 756deea38c7b2120703bdeaea69afd5414eb44f4 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Wed, 14 May 2025 23:56:31 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E4=BA=A4=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LoginLogic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/logic/LoginLogic.php b/app/api/logic/LoginLogic.php index a1dff54..c0deb44 100755 --- a/app/api/logic/LoginLogic.php +++ b/app/api/logic/LoginLogic.php @@ -402,7 +402,7 @@ class LoginLogic extends LogicBase //清除之前缓存 $token = Db::name('user_session') - ->where(['user_id' => $user_id, 'client' => $client]) + ->where(['user_id' => $user_id, 'terminal' => $client]) ->value('token'); if($token) { $token_cache = new TokenCache($token); @@ -410,7 +410,7 @@ class LoginLogic extends LogicBase } $result = Db::name('user_session') - ->where(['user_id' => $user_id, 'client' => $client]) + ->where(['user_id' => $user_id, 'terminal' => $client]) ->find(); $time = time(); @@ -419,7 +419,7 @@ class LoginLogic extends LogicBase $data = [ 'user_id' => $user_id, 'token' => $token, - 'client' => $client, + 'terminal' => $client, 'update_time' => $time, 'expire_time' => $expire_time, ]; @@ -428,7 +428,7 @@ class LoginLogic extends LogicBase Db::name('user_session')->insert($data); } else { Db::name('user_session') - ->where(['user_id' => $user_id, 'client' => $client]) + ->where(['user_id' => $user_id, 'terminal' => $client]) ->update($data); }