作者 谢百川

ok

... ... @@ -132,6 +132,7 @@ class Register extends Api
'createtime' => time(),
'updatetime' => time(),
'starttime' => strtotime($startTime),
'show_switch' => 1
];
} else {
$endTime = $this->request->param('endtime', '', 'string');
... ...
... ... @@ -447,6 +447,22 @@ class Student extends Api
$this->error('您的操作有误');
}
$subject = new Subject();
$subjectList = $subject->listByIds($studentInfo['subject_ids']);
$studentInfo['subject_list'] = $subjectList;
$up = new Up();
$studentInfo['up_info'] = $up->infoById($studentInfo['up_id']);
$college = new College();
$studentInfo['college_info'] = $college->infoById($studentInfo['college_id']);
$universityModel = new UniversityModel();
$studentInfo['university_info'] = $universityModel->infoById($studentInfo['university_id']);
$school = new School();
$studentInfo['school_info'] = $school->infoById($studentInfo['school_id']);
$studentInfo['head_image'] = $this->qiNiu.$studentInfo['head_image'];
$this->success('获取个人信息成功', $studentInfo);
... ...
... ... @@ -42,7 +42,10 @@ class Student extends Model
// 根据用户ID获取一个可以展示的学生的数据
public function infoByUserIdCanShow($userId)
{
return $this->where(['user_id' => ['=', $userId], 'show_switch' => ['=', 1]])->useSoftDelete($this->deleteTime)->find();
return $this
->where(['user_id' => ['=', $userId], 'show_switch' => ['=', 1]])
->useSoftDelete($this->deleteTime)
->find();
}
// 获取高中同城/省的本校学长
... ...