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