diff --git a/app/common/service/StudentScheduleService.php b/app/common/service/StudentScheduleService.php index 41e4a67..4dba642 100644 --- a/app/common/service/StudentScheduleService.php +++ b/app/common/service/StudentScheduleService.php @@ -22,13 +22,13 @@ class StudentScheduleService if (empty((array)$request->student) && empty((array)$request->parent)) { throw new Exception('请登陆后再查看'); } - if(!empty((array)$request->student)){ + if (!empty((array)$request->student)) { $student = Student::where(['id' => $request->student->id])->findOrEmpty(); if ($student->isEmpty()) { throw new Exception('未找到用户信息'); } } - if(!empty((array)$request->parent)){ + if (!empty((array)$request->parent)) { $student = Student::where(['parent_id' => $request->parent->id])->findOrEmpty(); if ($student->isEmpty()) { throw new Exception('未找到用户信息'); diff --git a/app/common/service/SubjectHomeworkService.php b/app/common/service/SubjectHomeworkService.php index 95a56ec..797cd95 100644 --- a/app/common/service/SubjectHomeworkService.php +++ b/app/common/service/SubjectHomeworkService.php @@ -178,6 +178,33 @@ class SubjectHomeworkService ->with(['teacher', 'subject']) ->findOrEmpty(); + + if ($subject_homework->homework_file_url) { + $subject_homework->homework_file_url = json_decode($subject_homework->homework_file_url, true); + } else { + $subject_homework->homework_file_url = []; + } + if ($subject_homework->homework_version_file_url) { + $subject_homework->homework_version_file_url = json_decode($subject_homework->homework_version_file_url, true); + } else { + $subject_homework->homework_version_file_url = []; + } + if ($subject_homework->last_homework_feedback_url) { + $subject_homework->last_homework_feedback_url = json_decode($subject_homework->last_homework_feedback_url, true); + } else { + $subject_homework->last_homework_feedback_url = []; + } + if ($subject_homework->subject_report_url) { + $subject_homework->subject_report_url = json_decode($subject_homework->subject_report_url, true); + } else { + $subject_homework->subject_report_url = []; + } + if ($subject_homework->subject_file_url) { + $subject_homework->subject_file_url = json_decode($subject_homework->subject_file_url, true); + } else { + $subject_homework->subject_file_url = []; + } + return [ 'code' => ResponseCode::SUCCESS, 'data' => $subject_homework, diff --git a/plugin/admin/app/view/subject-homework/index.html b/plugin/admin/app/view/subject-homework/index.html index 48e9b28..b99b848 100644 --- a/plugin/admin/app/view/subject-homework/index.html +++ b/plugin/admin/app/view/subject-homework/index.html @@ -210,6 +210,12 @@ }, { title: "教师", align: "center", field: "teacher_name", + }, { + title: "课程", align: "center", + field: "subject_name", + }, { + title: "课程【英文】", align: "center", + field: "english_name", }, { title: "教师排课id", align: "center", field: "teacher_schedule_time_id",