|
...
|
...
|
@@ -25,7 +25,11 @@ class KeywordController extends BaseController |
|
|
|
$map[] = ['title', 'like', "%{$this->param['search']}%"];
|
|
|
|
}
|
|
|
|
$sort = ['id' => 'desc'];
|
|
|
|
$data = $logic->getList($map, $sort, ['id', 'title', 'route', 'status', 'created_at']);
|
|
|
|
$data = $logic->getList($map, $sort, ['id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at']);
|
|
|
|
foreach ($data['list'] as &$v){
|
|
|
|
$v['product_num'] = $logic->getProductNum($v['title']);
|
|
|
|
$v['tdk'] = boolval($v['seo_title']) * boolval($v['seo_keywords']) * boolval($v['seo_description']);
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -36,7 +40,7 @@ class KeywordController extends BaseController |
|
|
|
'id.required' => 'ID不能为空'
|
|
|
|
]);
|
|
|
|
$data = $logic->getInfo($this->param['id']);
|
|
|
|
return $this->success(Arr::twoKeepKeys($data, ['id', 'title', 'route', 'created_at']));
|
|
|
|
return $this->success(Arr::twoKeepKeys($data, ['id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'created_at']));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function save(KeywordRequest $request, KeywordLogic $logic)
|
...
|
...
|
|