29 lines
828 B
PHP
Executable File
29 lines
828 B
PHP
Executable File
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | 宏驰云科技开发团队 版权所有 拥有最终解释权
|
|
// +----------------------------------------------------------------------
|
|
|
|
// | Author: HcyShop-kiki
|
|
// +----------------------------------------------------------------------
|
|
namespace app\api\validate;
|
|
use think\Db;
|
|
use think\Validate;
|
|
|
|
class Sign extends Validate{
|
|
protected $rule = [
|
|
'user_id' => '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;
|
|
}
|
|
} |