家长端登录
This commit is contained in:
parent
300ead8895
commit
6d06bfbe38
@ -19,12 +19,21 @@ class StudentFeedbackService
|
||||
public function feedback($request)
|
||||
{
|
||||
try {
|
||||
if (empty($request->student)) {
|
||||
throw new Exception('请登陆学生端后再试~');
|
||||
if (empty((array)$request->student) && empty((array)$request->parent)) {
|
||||
throw new Exception('请登陆后再查看');
|
||||
}
|
||||
$student = Student::where(['id' => $request->student->id])->findOrEmpty();
|
||||
if ($student->isEmpty()) {
|
||||
throw new Exception('未找到用户信息');
|
||||
if (!empty((array)$request->student)) {
|
||||
$student = Student::where(['id' => $request->student->id])->findOrEmpty();
|
||||
if ($student->isEmpty()) {
|
||||
throw new Exception('未找到用户信息');
|
||||
}
|
||||
}
|
||||
if (!empty((array)$request->parent)) {
|
||||
$student = Student::where(['parent_id' => $request->parent->id])->findOrEmpty();
|
||||
if ($student->isEmpty()) {
|
||||
throw new Exception('未找到用户信息');
|
||||
}
|
||||
|
||||
}
|
||||
$data = $request->post();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user