...
|
...
|
@@ -183,19 +183,25 @@ class SignController extends RestBaseController |
|
|
$score=Db::name('config')->where('id',1)->find();
|
|
|
if ($param['status']==1){
|
|
|
//早签到积分
|
|
|
$end_time=$score['morning_sign_end_time'];
|
|
|
$score=$score['morning_sign_score'];
|
|
|
$type='morning';
|
|
|
}elseif ($param['status']==2){
|
|
|
$end_time=$score['noon_sign_end_time'];
|
|
|
$score=$score['noon_sign_score'];
|
|
|
$type='noon';
|
|
|
}elseif ($param['status']==3){
|
|
|
$end_time=$score['night_sign_end_time'];
|
|
|
$score=$score['night_sign_score'];
|
|
|
$type='night';
|
|
|
}elseif ($param['status']==4){
|
|
|
$end_time=$score['sleep_sign_end_time'];
|
|
|
$score=$score['sleep_sign_score'];
|
|
|
$type='sleep';
|
|
|
}
|
|
|
|
|
|
if(time()>$end_time){
|
|
|
$this->error('当前签到时间已过');
|
|
|
}
|
|
|
if(Db::name('user_sign')->where('user_id',$user['id'])->whereNotNull("$type")->find()){
|
|
|
$this->error('当前时间段已签到');
|
|
|
}
|
...
|
...
|
|