Commit ccab5ad6 by 杨树贤

修复bug

parent 533c48a2
...@@ -116,6 +116,8 @@ class SelfBrandModel extends Model ...@@ -116,6 +116,8 @@ class SelfBrandModel extends Model
if (!empty($map['limit'])) { if (!empty($map['limit'])) {
$query->limit($map['limit']); $query->limit($map['limit']);
} else {
$query->limit(200);
} }
return $query->get()->toArray(); return $query->get()->toArray();
......
...@@ -66,7 +66,7 @@ class SelfClassifyModel extends Model ...@@ -66,7 +66,7 @@ class SelfClassifyModel extends Model
return $this->select($field)->with([ return $this->select($field)->with([
'sub_class' => function ($query) use ($field) { 'sub_class' => function ($query) use ($field) {
array_push($field, 'parent_id'); array_push($field, 'parent_id');
$query->select($field); $query->select($field)->where('status',1);
}, },
])->where('status', 1)->where('parent_id', 0) ])->where('status', 1)->where('parent_id', 0)
->orderBy('class_id', 'desc')->limit(9)->get()->toArray(); ->orderBy('class_id', 'desc')->limit(9)->get()->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment