| xqd
@@ -349,7 +349,14 @@ class ApiController extends Controller
|
|
|
$this_week_begin = $today->toDateTimeString();
|
|
|
$this_week_end = $today->addDays(7)->toDateTimeString();
|
|
|
|
|
|
- return response()->json(['status' => 'success', 'courseInfo' => $student_course]);
|
|
|
+ $tmp = Remark::where([
|
|
|
+ ['student_id', '=', $student->id],
|
|
|
+ ['created_at', '>=', $this_week_begin],
|
|
|
+ ['created_at', '<', $this_week_end],
|
|
|
+ ])->first();
|
|
|
+ $is_new = empty($tmp) ? true : false;
|
|
|
+
|
|
|
+ return response()->json(['status' => 'success', 'courseInfo' => $student_course, 'is_new' => $is_new]);
|
|
|
}
|
|
|
|
|
|
public function getMyLearnInfo(Request $request)
|