|
@@ -99,7 +99,11 @@ class PageService extends BaseService
|
|
|
|
|
|
public function filterConfig($params)
|
|
|
{
|
|
|
- $spec = Spec::get();
|
|
|
+ if ($params['type'] == "category") {
|
|
|
+ $spec = Spec::with(["attrs"])->orderByDesc("category_weight")->get();
|
|
|
+ } else {
|
|
|
+ $spec = Spec::with(["attrs"])->orderByDesc("search_weight")->get();
|
|
|
+ }
|
|
|
|
|
|
return $spec->map(function (Spec $model) {
|
|
|
return [
|