30 lines
471 B
PHP
30 lines
471 B
PHP
|
<?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
|
||
|
{
|
||
|
protected $middleware = [];
|
||
|
|
||
|
protected function initialize()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据上级行政代码 获取下级
|
||
|
* */
|
||
|
public function index()
|
||
|
{
|
||
|
$pcode = input("areaId/d",86);
|
||
|
return json(AreaModel::getByPCode($pcode,false));
|
||
|
}
|
||
|
}
|