From 837d11a88b6d552cd87042495dd60ebce489664e Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Mon, 24 Jun 2024 15:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=BB=91=E5=AE=9A=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/LoginController.php | 2 +- app/api/logic/LoginLogic.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/controller/LoginController.php b/app/api/controller/LoginController.php index 4c4ce8d18..dd8ab2244 100644 --- a/app/api/controller/LoginController.php +++ b/app/api/controller/LoginController.php @@ -82,7 +82,7 @@ class LoginController extends BaseApiController if ($result === false) { return $this->fail(LoginLogic::getError()); } - return $this->success('操作成功', [], 1, 1); + return $this->success('操作成功', [], 1, 0); } /** diff --git a/app/api/logic/LoginLogic.php b/app/api/logic/LoginLogic.php index 5ca9d4c29..798b3b577 100644 --- a/app/api/logic/LoginLogic.php +++ b/app/api/logic/LoginLogic.php @@ -443,12 +443,12 @@ class LoginLogic extends BaseLogic { $find=User::where(['mobile' =>$params['mobile']])->find(); if($find){ - $auth=UserAuth::where(['user_id'=>$find['id'],'terminal'=>1])->find(); + $auth=UserAuth::where(['user_id'=>$find['id']])->find();//别人的 if($auth){ - self::$error ='该手机号已被绑定'; + self::$error ='该手机号已绑定'; return false; }else{ - UserAuth::where(['user_id'=>$find['id'],'terminal'=>1])->update(['user_id'=>$find['id']]); + UserAuth::where(['user_id'=>$userId])->update(['user_id'=>$find['id']]); } } $data=[