coupon-admin/app/controller/api/Area.php

28 lines
487 B
PHP
Raw Normal View History

2021-11-29 09:32:48 +00: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 10:34:44 +00:00
protected $noNeedLogin = [
'index',
];
2021-11-29 09:32:48 +00:00
/**
* 根据上级行政代码 获取下级
* */
public function index()
{
$pcode = input("areaId/d",86);
2021-12-15 07:04:20 +00:00
$filter = input("filter",false);
return json(AreaModel::getByPCode($pcode,$filter));
2021-11-29 09:32:48 +00:00
}
}