...
|
...
|
@@ -301,8 +301,16 @@ class Teacher extends Api |
|
|
->where('user_id',$user_id)
|
|
|
->field('id,territory_id')
|
|
|
->find();
|
|
|
$teacher_territory = explode(',',$teacher['territory_id']);
|
|
|
if(empty($teacher['territory_id'])){
|
|
|
$teacher_territory = [];
|
|
|
}else{
|
|
|
$teacher_territory = explode(',',$teacher['territory_id']);
|
|
|
}
|
|
|
|
|
|
array_push($teacher_territory,$id);
|
|
|
if(count($teacher_territory) >4){
|
|
|
$this->error('最多添加4个擅长领域');
|
|
|
}
|
|
|
$upd_territory = implode(',',$teacher_territory);
|
|
|
$upd_teacher = Db::name('teacher')
|
|
|
->where('user_id',$user_id)
|
...
|
...
|
|