39 lines
718 B
PHP
39 lines
718 B
PHP
<?php
|
|
|
|
namespace app\controller\manager;
|
|
|
|
use app\repository\CmsRepository;
|
|
|
|
use app\model\Area as AreaModel;
|
|
|
|
use think\response\Json;
|
|
use think\response\View;
|
|
|
|
/**
|
|
* 地域管理
|
|
*
|
|
* Class Menu
|
|
* @package app\controller\manager
|
|
*/
|
|
class Area extends Base
|
|
{
|
|
/**
|
|
* 列表
|
|
*
|
|
* @return View|Json
|
|
*/
|
|
public function index()
|
|
{
|
|
if ($this->request->isPost()) {
|
|
$menus = AreaModel::getAllList();
|
|
$res = [
|
|
'code' => 0,
|
|
'msg' => 'success',
|
|
'count' => $menus->count(),
|
|
'data' => $menus->toArray(),
|
|
];
|
|
return json($res);
|
|
}
|
|
return $this->view();
|
|
}
|
|
} |