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