|
|
@@ -57,11 +57,16 @@ class ArticleService extends BaseService
|
|
|
$where = ['a.mark' => 1];
|
|
|
$status = isset($params['status']) ? $params['status'] : 0;
|
|
|
$type = isset($params['type']) ? $params['type'] : 0;
|
|
|
+ $cateId = isset($params['cate_id']) ? $params['cate_id'] : 0;
|
|
|
|
|
|
if ($status > 0) {
|
|
|
$where['a.status'] = $status;
|
|
|
}
|
|
|
|
|
|
+ if ($cateId > 0) {
|
|
|
+ $where['a.cate_id'] = $cateId;
|
|
|
+ }
|
|
|
+
|
|
|
$list = $this->model->with(['category'])->from('article as a')
|
|
|
->where($where)
|
|
|
->where(function ($query) use ($type) {
|