From 2e6631047af52c9637924555a07e41e3ddd52fe1 Mon Sep 17 00:00:00 2001 From: Dai Date: Sat, 27 Jul 2024 14:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E4=BF=A1=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/TeacherService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/service/TeacherService.php b/app/common/service/TeacherService.php index 57a2b1d..023f479 100644 --- a/app/common/service/TeacherService.php +++ b/app/common/service/TeacherService.php @@ -103,7 +103,8 @@ class TeacherService { try { $teacher = Teacher::where(['id' => $request->teacher->id])->field('id,account,teacher_name,time_zone_offset,time_zone_id,time_zone_name')->findOrEmpty(); - + $teacher = $teacher->toArray(); + $teacher['role'] = 'teacher'; return [ 'code' => ResponseCode::SUCCESS, 'data' => $teacher,