|
...
|
...
|
@@ -409,12 +409,10 @@ class ProductLogic extends BaseLogic |
|
|
|
//三种状态 0:草稿 1:发布 2:回收站
|
|
|
|
$data = ['dra'=>0,'pub'=>1,'del'=>2,'tal'=>3];
|
|
|
|
foreach ($data as $k => $v){
|
|
|
|
$cateModel = new Category();
|
|
|
|
$ids = $cateModel->where('title', 'not like', '%Featured%')->pluck('id')->toArray();
|
|
|
|
if($v == 3){
|
|
|
|
$data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->whereIn('id',$ids)->count();
|
|
|
|
$data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->count();
|
|
|
|
}else{
|
|
|
|
$data[$k] = $this->model->where(['status'=>$v,'project_id'=>$this->user['project_id'],''])->count();
|
|
|
|
$data[$k] = $this->model->where(['status'=>$v,'project_id'=>$this->user['project_id']])->count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
...
|
...
|
|