新增分类排序

This commit is contained in:
augushong
2020-10-29 15:17:04 +08:00
parent 8f7f4c826a
commit 04d7bd0743
6 changed files with 23 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ class Index extends Common
$current_category = [];
if (!empty($this->request->param('category_id'))) {
$sub_category = Category::where('pid', $this->request->param('category_id'))->where('type', 3)->select();
$sub_category = Category::where('pid', $this->request->param('category_id'))->where('type', 3)->order('sort asc')->select();
$current_category = Category::find($this->request->param('category_id'));
if (empty($this->request->param('sub_category_id'))) {
$categorys = [$this->request->param('category_id')];