From 10c0d16d8aa8a2a7d3b589c535f63c98a961a687 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Sat, 22 Feb 2025 22:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AFws=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E4=BC=9A=E4=B8=8A=E5=8F=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/TaskController.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controller/api/TaskController.php b/app/controller/api/TaskController.php index 2b9d32c..73a7590 100644 --- a/app/controller/api/TaskController.php +++ b/app/controller/api/TaskController.php @@ -82,10 +82,13 @@ class TaskController $user_id = $request->data['id']; $phone = $request->post('phone'); $GetLodeLog = GetLodeLog::where('phone', $phone)->first(); - if (!empty($GetLodeLog) && $GetLodeLog->status == 0) { + if(is_null($GetLodeLog)){ + return ApiResponseApp::error([],'请发送验证码'); + } + if ($GetLodeLog->status == 0) { return ApiResponseApp::success([]); } - if (!empty($GetLodeLog) && $GetLodeLog->status == 1) { + if ($GetLodeLog->status == 1) { $GetLodeLog->status = 2; $GetLodeLog->save(); return ApiResponseApp::success(['code' => $GetLodeLog->code]); @@ -93,8 +96,8 @@ class TaskController /** * 这里查询是否上号成功 2是等待上号 */ - if (!empty($GetLodeLog) && $GetLodeLog->status == 2) { - $ws_build_status = SendCode::send_code($phone)['code']; + if ($GetLodeLog->status == 2) { + $ws_build_status = SendCode::get_ws_status($phone); //上号成功 if ($ws_build_status == 0) { //检查是否在本地库中 如果不在则是全新