正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -409,12 +409,10 @@ class ProductLogic extends BaseLogic | @@ -409,12 +409,10 @@ class ProductLogic extends BaseLogic | ||
| 409 | //三种状态 0:草稿 1:发布 2:回收站 | 409 | //三种状态 0:草稿 1:发布 2:回收站 |
| 410 | $data = ['dra'=>0,'pub'=>1,'del'=>2,'tal'=>3]; | 410 | $data = ['dra'=>0,'pub'=>1,'del'=>2,'tal'=>3]; |
| 411 | foreach ($data as $k => $v){ | 411 | foreach ($data as $k => $v){ |
| 412 | - $cateModel = new Category(); | ||
| 413 | - $ids = $cateModel->where('title', 'not like', '%Featured%')->pluck('id')->toArray(); | ||
| 414 | if($v == 3){ | 412 | if($v == 3){ |
| 415 | - $data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->whereIn('id',$ids)->count(); | 413 | + $data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->count(); |
| 416 | }else{ | 414 | }else{ |
| 417 | - $data[$k] = $this->model->where(['status'=>$v,'project_id'=>$this->user['project_id'],''])->count(); | 415 | + $data[$k] = $this->model->where(['status'=>$v,'project_id'=>$this->user['project_id']])->count(); |
| 418 | } | 416 | } |
| 419 | } | 417 | } |
| 420 | return $this->success($data); | 418 | return $this->success($data); |
-
请 注册 或 登录 后发表评论