重置头像

This commit is contained in:
Dai 2024-09-19 15:56:17 +08:00
parent e58b42eefb
commit cb42fec068
3 changed files with 8 additions and 3 deletions

View File

@ -257,7 +257,8 @@ class StudentController extends Crud
} }
$res = $student->save([ $res = $student->save([
'openid' => '' 'openid' => '',
'avatar' => '',
]); ]);
if (!$res) { if (!$res) {
throw new Exception('重置失败'); throw new Exception('重置失败');

View File

@ -183,7 +183,8 @@ class StudentParentController extends Crud
} }
$res = $parent->save([ $res = $parent->save([
'openid' => '' 'openid' => '',
'avatar' => '',
]); ]);
if (!$res) { if (!$res) {
throw new Exception('重置失败'); throw new Exception('重置失败');

View File

@ -351,7 +351,10 @@ class TeacherController extends Crud
throw new Exception('未找到教师信息'); throw new Exception('未找到教师信息');
} }
$res = $teacher->save(['openid' => '']); $res = $teacher->save([
'openid' => '',
'avatar' => '',
]);
if(!$res){ if(!$res){
throw new Exception('操作失败'); throw new Exception('操作失败');
} }