作者 lyh

gx

@@ -219,7 +219,11 @@ class BlogLogic extends BaseLogic @@ -219,7 +219,11 @@ class BlogLogic extends BaseLogic
219 if($v == 3){ 219 if($v == 3){
220 $data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->count(); 220 $data[$k] = $this->model->where(['project_id'=>$this->user['project_id']])->count();
221 }else{ 221 }else{
222 - $data[$k] = $this->model->where(['status'=>$v,'project_id'=>$this->user['project_id']])->count(); 222 + if($v == 0){
  223 + $data[$k] = $this->model->formatQuery(['status' => ['in',[0,3]], 'project_id' => $this->user['project_id']])->count();
  224 + }else{
  225 + $data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count();
  226 + }
223 } 227 }
224 } 228 }
225 return $this->success($data); 229 return $this->success($data);
@@ -236,7 +236,11 @@ class NewsLogic extends BaseLogic @@ -236,7 +236,11 @@ class NewsLogic extends BaseLogic
236 if ($v == 3) { 236 if ($v == 3) {
237 $data[$k] = $this->model->where(['project_id' => $this->user['project_id']])->count(); 237 $data[$k] = $this->model->where(['project_id' => $this->user['project_id']])->count();
238 } else { 238 } else {
239 - $data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count(); 239 + if($v == 0){
  240 + $data[$k] = $this->model->formatQuery(['status' => ['in',[0,3]], 'project_id' => $this->user['project_id']])->count();
  241 + }else{
  242 + $data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count();
  243 + }
240 } 244 }
241 } 245 }
242 return $this->success($data); 246 return $this->success($data);