|
...
|
...
|
@@ -2,10 +2,12 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Bside\Product;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Http\Controllers\Bside\BaseController;
|
|
|
|
use App\Http\Logic\Bside\Product\KeywordLogic;
|
|
|
|
use App\Http\Requests\Bside\Product\KeywordRequest;
|
|
|
|
use App\Models\Product\Keyword;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Rules\Ids;
|
|
|
|
use Illuminate\Http\Request;
|
|
...
|
...
|
@@ -19,15 +21,22 @@ use Illuminate\Http\Request; |
|
|
|
class KeywordController extends BaseController
|
|
|
|
{
|
|
|
|
|
|
|
|
public function index(KeywordLogic $logic)
|
|
|
|
/**
|
|
|
|
* @remark :关键字列表
|
|
|
|
* @name :index
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/17 10:57
|
|
|
|
*/
|
|
|
|
public function index(Keyword $keyword)
|
|
|
|
{
|
|
|
|
$map = [];
|
|
|
|
if(!empty($this->param['search'])){
|
|
|
|
$map[] = ['title', 'like', "%{$this->param['search']}%"];
|
|
|
|
if(!empty($this->map['title'])){
|
|
|
|
$this->map['title'] = ['like','%'.$this->map['title'].'%'];
|
|
|
|
}
|
|
|
|
$sort = ['id' => 'desc'];
|
|
|
|
$data = $logic->getList($map, $sort, ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at'],$this->row);
|
|
|
|
return $this->success($data);
|
|
|
|
$this->map['project_id'] = $this->user['project_id'];
|
|
|
|
$filed = ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at'];
|
|
|
|
$data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed);
|
|
|
|
return $this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function info(Request $request, KeywordLogic $logic){
|
...
|
...
|
|