前端组件调整,剔除无用文件

This commit is contained in:
2019-09-28 20:12:43 +08:00
parent 0b0d659c5e
commit c29b8358be
3496 changed files with 893 additions and 393801 deletions

View File

@@ -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;
}
}