diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 918f744..7fb1b9f 100755 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -374,6 +374,6 @@ class Ajax extends Backend public function getItems(){ - return $items = \app\admin\model\Item::where('level',1)->field('id,title as name')->select(); + return $items = \app\admin\model\Item::where('level',1)->field('id,title as name')->order('sort','desc')->select(); } } diff --git a/application/admin/controller/statistics/Item.php b/application/admin/controller/statistics/Item.php index 6084985..b5c9277 100644 --- a/application/admin/controller/statistics/Item.php +++ b/application/admin/controller/statistics/Item.php @@ -55,7 +55,7 @@ class Item extends Backend } } - $items = Db::name('item') + /* $items = Db::name('item') ->where('status', 1) ->field(['id', 'title', 'key_word', 'pid']) ->order('pid', 'asc') @@ -65,10 +65,11 @@ class Item extends Backend $formattedTree = $this->formatTree($tree); $this->items = $items; - $this->itemsformattedTree = $formattedTree; + $this->itemsformattedTree = $formattedTree;*/ + $items = \app\admin\model\Item::where('level',1)->field('id,title')->order('sort','desc')->select(); $this->view->assign("sources", $res); - $this->view->assign("items", $formattedTree); + $this->view->assign("items", $items); } diff --git a/application/admin/view/statistics/item/index.html b/application/admin/view/statistics/item/index.html index 346ae2d..5dc1b6f 100644 --- a/application/admin/view/statistics/item/index.html +++ b/application/admin/view/statistics/item/index.html @@ -104,6 +104,16 @@ + +
+ +
+