前端组件调整,剔除无用文件
This commit is contained in:
@@ -18,12 +18,20 @@ class Menu extends Admin{
|
||||
*/
|
||||
public function index(){
|
||||
if($this->request->isAjax()){
|
||||
$tree = $this->request->param('tree', 0);
|
||||
$menu = new MenuModel();
|
||||
$map = array();
|
||||
|
||||
$res = $menu->where($map)->order('sort asc, id asc')->select();
|
||||
|
||||
$this->data['data'] = $res;
|
||||
$list = $res->toArray();
|
||||
if($tree){
|
||||
if (!empty($list)) {
|
||||
$tree = new \com\Tree();
|
||||
$list = $tree->toFormatTree($list);
|
||||
}
|
||||
}
|
||||
$this->data['data'] = $list;
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user