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

修改认证机构

@@ -468,11 +468,17 @@ class Attestation extends Api @@ -468,11 +468,17 @@ class Attestation extends Api
468 ->where($where['city']) 468 ->where($where['city'])
469 ->select(); 469 ->select();
470 if(empty($city)){ 470 if(empty($city)){
471 - $city = Db::name('government') 471 + $province = Db::name('government')
472 ->where($where['province']) 472 ->where($where['province'])
473 ->select(); 473 ->select();
474 - if(empty($city)){ 474 + if(empty($province)){
475 $this->success('暂无机构'); 475 $this->success('暂无机构');
  476 + }else{
  477 + foreach ($province as $v){
  478 + $res['id'] = $v['id'];
  479 + $res['institution'] = $v['address'];
  480 + }
  481 + $this->success('success',$res);
476 } 482 }
477 }else{ 483 }else{
478 foreach ($city as $v){ 484 foreach ($city as $v){