正在显示
1 个修改的文件
包含
16 行增加
和
7 行删除
| @@ -2,10 +2,12 @@ | @@ -2,10 +2,12 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Controllers\Bside\Product; | 3 | namespace App\Http\Controllers\Bside\Product; |
| 4 | 4 | ||
| 5 | +use App\Enums\Common\Code; | ||
| 5 | use App\Helper\Arr; | 6 | use App\Helper\Arr; |
| 6 | use App\Http\Controllers\Bside\BaseController; | 7 | use App\Http\Controllers\Bside\BaseController; |
| 7 | use App\Http\Logic\Bside\Product\KeywordLogic; | 8 | use App\Http\Logic\Bside\Product\KeywordLogic; |
| 8 | use App\Http\Requests\Bside\Product\KeywordRequest; | 9 | use App\Http\Requests\Bside\Product\KeywordRequest; |
| 10 | +use App\Models\Product\Keyword; | ||
| 9 | use App\Models\Project\Project; | 11 | use App\Models\Project\Project; |
| 10 | use App\Rules\Ids; | 12 | use App\Rules\Ids; |
| 11 | use Illuminate\Http\Request; | 13 | use Illuminate\Http\Request; |
| @@ -19,15 +21,22 @@ use Illuminate\Http\Request; | @@ -19,15 +21,22 @@ use Illuminate\Http\Request; | ||
| 19 | class KeywordController extends BaseController | 21 | class KeywordController extends BaseController |
| 20 | { | 22 | { |
| 21 | 23 | ||
| 22 | - public function index(KeywordLogic $logic) | 24 | + /** |
| 25 | + * @remark :关键字列表 | ||
| 26 | + * @name :index | ||
| 27 | + * @author :lyh | ||
| 28 | + * @method :post | ||
| 29 | + * @time :2023/8/17 10:57 | ||
| 30 | + */ | ||
| 31 | + public function index(Keyword $keyword) | ||
| 23 | { | 32 | { |
| 24 | - $map = []; | ||
| 25 | - if(!empty($this->param['search'])){ | ||
| 26 | - $map[] = ['title', 'like', "%{$this->param['search']}%"]; | 33 | + if(!empty($this->map['title'])){ |
| 34 | + $this->map['title'] = ['like','%'.$this->map['title'].'%']; | ||
| 27 | } | 35 | } |
| 28 | - $sort = ['id' => 'desc']; | ||
| 29 | - $data = $logic->getList($map, $sort, ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at'],$this->row); | ||
| 30 | - return $this->success($data); | 36 | + $this->map['project_id'] = $this->user['project_id']; |
| 37 | + $filed = ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'status', 'created_at']; | ||
| 38 | + $data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed); | ||
| 39 | + return $this->response('success',Code::SUCCESS,$data); | ||
| 31 | } | 40 | } |
| 32 | 41 | ||
| 33 | public function info(Request $request, KeywordLogic $logic){ | 42 | public function info(Request $request, KeywordLogic $logic){ |
-
请 注册 或 登录 后发表评论