|
...
|
...
|
@@ -32,11 +32,8 @@ class KeywordController extends BaseController |
|
|
|
*/
|
|
|
|
public function index(Keyword $keyword)
|
|
|
|
{
|
|
|
|
if(!empty($this->map['title'])){
|
|
|
|
$this->map['title'] = ['like','%'.$this->map['title'].'%'];
|
|
|
|
}
|
|
|
|
$this->map['project_id'] = $this->user['project_id'];
|
|
|
|
$filed = ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at','route'];
|
|
|
|
$this->map = $this->searchParam($this->map);
|
|
|
|
$filed = ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at','route','keyword_title'];
|
|
|
|
$data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed);
|
|
|
|
if(!empty($data)){
|
|
|
|
foreach ($data['list'] as &$v){
|
|
...
|
...
|
@@ -53,6 +50,24 @@ class KeywordController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :搜索
|
|
|
|
* @name :searchParam
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/21 17:40
|
|
|
|
*/
|
|
|
|
public function searchParam($map){
|
|
|
|
if(!empty($map['title'])){
|
|
|
|
$map['title'] = ['like','%'.$map['title'].'%'];
|
|
|
|
}
|
|
|
|
if(!empty($map['keyword_title'])){
|
|
|
|
$map['keyword_title'] = ['like','%'.$map['keyword_title'].'%'];
|
|
|
|
}
|
|
|
|
$map['project_id'] = $this->user['project_id'];
|
|
|
|
return $this->success($map);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取数据详情
|
|
|
|
* @name :info
|
|
|
|
* @author :lyh
|
...
|
...
|
|