|
|
|
|
@ -11,6 +11,7 @@ use App\Jobs\SendAppointCar;
|
|
|
|
|
use App\Jobs\SendCourseCar;
|
|
|
|
|
use App\Models\Appointment;
|
|
|
|
|
use App\Models\Config;
|
|
|
|
|
use App\Models\CourseContentCheck;
|
|
|
|
|
use App\Models\CourseSign;
|
|
|
|
|
use App\Models\RelatedModel;
|
|
|
|
|
use App\Models\ScoreLog;
|
|
|
|
|
@ -596,6 +597,14 @@ class UserController extends CommonController
|
|
|
|
|
if (empty($courseSigns)) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '未报名课程']);
|
|
|
|
|
}
|
|
|
|
|
$user = User::where('mobile', $all['mobile'])->first();
|
|
|
|
|
$list = CourseContentCheck::where('course_id', $all['course_id'])
|
|
|
|
|
->where('user_id', $user->id)
|
|
|
|
|
->orderBy('created_at', 'desc')
|
|
|
|
|
->get();
|
|
|
|
|
if ($list->isNotEmpty()) {
|
|
|
|
|
return $this->success($list);
|
|
|
|
|
}
|
|
|
|
|
$key = 'sms_login_' . $all['mobile'];
|
|
|
|
|
$check = Cache::get($key);
|
|
|
|
|
if (isset($check) && time() - $check['time'] <= 60) {
|
|
|
|
|
|