diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index 19c69c32..d816c2e4 100644 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -233,11 +233,13 @@ class Chengji extends BaseModel { $xm = $this->cjAdmin->xingming . '(' . $this->cjAdmin->adSchool->jiancheng . ')'; } - }else{ + }elseif ($data['user_group'] === 'teacher') { if($this->cjTeacher) { $xm = $this->cjTeacher->xingming . '(' . $this->cjTeacher->jsDanwei->jiancheng . ')'; } + }else { + $xm = ''; } $arr = [ diff --git a/app/system/model/Fields.php b/app/system/model/Fields.php index 0df19ca5..52521988 100644 --- a/app/system/model/Fields.php +++ b/app/system/model/Fields.php @@ -84,11 +84,13 @@ class Fields extends BaseModel { $xm = $this->flAdmin->xingming . '(' . $this->flAdmin->adSchool->jiancheng . ')'; } - }else{ + }elseif ($data['user_group'] === 'teacher') { if($this->flTeacher) { $xm = $this->flTeacher->xingming . '(' . $this->flTeacher->jsDanwei->jiancheng . ')'; } + }else{ + $xm = ''; } $arr = [