From 4c3bdb8767693d16d3919a08fecdfa25daba9069 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Thu, 15 May 2025 15:38:51 +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/validate/SignValidate.php | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/api/validate/SignValidate.php diff --git a/app/api/validate/SignValidate.php b/app/api/validate/SignValidate.php new file mode 100644 index 0000000..fd7e819 --- /dev/null +++ b/app/api/validate/SignValidate.php @@ -0,0 +1,40 @@ + 'checkSign', + ]; + + public function checkSign($value,$data,$rule){ + $today = Db::name('user_sign') + ->where('del',0) + ->where('user_id',$value) + ->whereTime('sign_time', 'today') + ->find(); + if($today){ + return '您今天已签到过了'; + } + + return true; + } +} \ No newline at end of file