Area::wherePid($id)->select(['id', 'name', 'code'])->get() ]); } /** * 获取开放地区列表 * @author wsl * @date 2018/12/21 * @param $id * @description */ public function openArea($id) { //先查找已开放和未冻结的区域 $allowarea=Proxy::whereStatus(1)->select('province','city','district')->get()->toArray(); $arr=[]; if(!empty($allowarea)){ foreach($allowarea as $key=>$value){ $arr[]=$value['province']; $arr[]=$value['city']; $arr[]=$value['district']; } } return showJson(101, 1001, [ 'list' => Area::wherePid($id)->whereIn('id',$arr)->select(['id', 'name', 'code'])->get() ]); } }