From 5f49d6147ff1ada4aaeb05ce71683378d4a06f4e Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Sun, 16 Feb 2025 20:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dws=E5=8F=B7=E7=A0=81=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/Task2.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/process/Task2.php b/process/Task2.php index d29c0c0..25e3297 100644 --- a/process/Task2.php +++ b/process/Task2.php @@ -48,14 +48,16 @@ class Task2 $phones=UserPhone::all(); foreach($phones as $key =>$value){ // var_dump($value->last_time); + $currentTimestamp = time(); if(SendCode::get_ws_status($value->phone)==0){ - $currentTimestamp = time(); - var_dump($currentTimestamp-$value->last_time); $value->time=$value->time+$currentTimestamp-$value->last_time; $value->last_time=$currentTimestamp; $value->status=1; - $value->save(); + }else{ + $value->status=0; } + $value->last_time=$currentTimestamp; + $value->save(); } }); }