作者 郭盛
1 个管道 的构建 通过 耗费 0 秒

修改擅长领域问题

... ... @@ -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)
... ...
... ... @@ -9412,7 +9412,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-03-18 10:07:15 </div>
Generated on 2020-03-18 10:26:02 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...