| 
									
										
										
										
											2021-11-29 17:32:48 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace app\controller\api; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use think\facade\Db; | 
					
						
							|  |  |  | use app\model\Area as AreaModel; | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Area | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Class Business | 
					
						
							|  |  |  |  * @package app\controller\api | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | class Area extends Base | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2021-12-02 18:34:44 +08:00
										 |  |  |     protected $noNeedLogin = [ | 
					
						
							|  |  |  |         'index', | 
					
						
							|  |  |  |     ]; | 
					
						
							| 
									
										
										
										
											2021-11-29 17:32:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * 根据上级行政代码 获取下级 | 
					
						
							|  |  |  |      * */ | 
					
						
							|  |  |  |     public function index() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $pcode = input("areaId/d",86); | 
					
						
							| 
									
										
										
										
											2021-12-15 15:04:20 +08:00
										 |  |  |         $filter = input("filter",false); | 
					
						
							|  |  |  |         return  json(AreaModel::getByPCode($pcode,$filter)); | 
					
						
							| 
									
										
										
										
											2021-11-29 17:32:48 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | } |