修复类别修改错误优化类别列表
This commit is contained in:
1 parent
0305278b47
commit
6c069592ef
5 files changed
+30
-8
No files matched your search
@@ -53,6 +53,13 @@ class Category extends Base
|
||||
//查询数据
|
||||
$data =CG::field('id,title,pid,status,paixu')
|
||||
->order([$order_field=>$order])
|
||||
->with(
|
||||
[
|
||||
'glPid'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
]
|
||||
)
|
||||
->limit($limit_start,$limit_length)
|
||||
->all();
|
||||
|
||||
@@ -64,6 +71,13 @@ class Category extends Base
|
||||
->whereOr('pid','in',function($query) use ($search){
|
||||
$query->name('category')->where('title','like','%'.$search.'%')->field('id');
|
||||
})
|
||||
->with(
|
||||
[
|
||||
'glPid'=>function($query){
|
||||
$query->field('id,title');
|
||||
},
|
||||
]
|
||||
)
|
||||
->order([$order_field=>$order])
|
||||
->limit($limit_start,$limit_length)
|
||||
->select();
|
||||
|
||||
Reference in new issue
Block a user