|
|
|
@ -527,6 +527,10 @@ class CourseController extends CommonController
|
|
|
|
if ($distance > $content_check_range) {
|
|
|
|
if ($distance > $content_check_range) {
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '超出打卡范围']);
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '超出打卡范围']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 判断当天才能签到
|
|
|
|
|
|
|
|
if (date('Y-m-d') != $courseContent->date) {
|
|
|
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '不在签到时间']);
|
|
|
|
|
|
|
|
}
|
|
|
|
CourseContentCheck::create([
|
|
|
|
CourseContentCheck::create([
|
|
|
|
'course_content_id' => $all['course_content_id'],
|
|
|
|
'course_content_id' => $all['course_content_id'],
|
|
|
|
'user_id' => $this->getUserId(),
|
|
|
|
'user_id' => $this->getUserId(),
|
|
|
|
|