正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
@@ -184,25 +184,25 @@ class SignController extends RestBaseController | @@ -184,25 +184,25 @@ class SignController extends RestBaseController | ||
184 | $end_time=time(); | 184 | $end_time=time(); |
185 | if ($param['status']==1){ | 185 | if ($param['status']==1){ |
186 | //早签到积分 | 186 | //早签到积分 |
187 | - $end_time=$score['morning_sign_end_time']; | 187 | + $end_time=date('H:i',$score['morning_sign_end_time']); |
188 | $score=$score['morning_sign_score']; | 188 | $score=$score['morning_sign_score']; |
189 | $type='morning'; | 189 | $type='morning'; |
190 | }elseif ($param['status']==2){ | 190 | }elseif ($param['status']==2){ |
191 | - $end_time=$score['noon_sign_end_time']; | 191 | + $end_time=date('H:i',$score['noon_sign_end_time']); |
192 | $score=$score['noon_sign_score']; | 192 | $score=$score['noon_sign_score']; |
193 | $type='noon'; | 193 | $type='noon'; |
194 | }elseif ($param['status']==3){ | 194 | }elseif ($param['status']==3){ |
195 | - $end_time=$score['night_sign_end_time']; | 195 | + $end_time=date('H:i',$score['night_sign_end_time']); |
196 | $score=$score['night_sign_score']; | 196 | $score=$score['night_sign_score']; |
197 | $type='night'; | 197 | $type='night'; |
198 | }elseif ($param['status']==4){ | 198 | }elseif ($param['status']==4){ |
199 | - $end_time=$score['sleep_sign_end_time']; | 199 | + $end_time=date('H:i',$score['sleep_sign_end_time']); |
200 | $score=$score['sleep_sign_score']; | 200 | $score=$score['sleep_sign_score']; |
201 | $type='sleep'; | 201 | $type='sleep'; |
202 | } | 202 | } |
203 | -// if(time()>$end_time){ | ||
204 | -// $this->error('当前签到时间已过'); | ||
205 | -// } | 203 | + if(date('H:i:s',time())>$end_time){ |
204 | + $this->error('当前签到时间已过'); | ||
205 | + } | ||
206 | if(Db::name('user_sign')->where('user_id',$user['id'])->whereNotNull("$type")->find()){ | 206 | if(Db::name('user_sign')->where('user_id',$user['id'])->whereNotNull("$type")->find()){ |
207 | $this->error('当前时间段已签到'); | 207 | $this->error('当前时间段已签到'); |
208 | } | 208 | } |
-
请 注册 或 登录 后发表评论