作者 赵彬吉
@@ -47,7 +47,7 @@ class ProductController extends BaseController @@ -47,7 +47,7 @@ class ProductController extends BaseController
47 */ 47 */
48 public function index(Product $product) 48 public function index(Product $product)
49 { 49 {
50 - $filed = ['id', 'project_id', 'title', 'sort' ,'thumb' ,'product_type' , 'route' , 50 + $filed = ['id', 'project_id', 'title', 'sort' ,'thumb' ,'product_type' , 'route' , 'intro' , 'content' ,
51 'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at','six_read']; 51 'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at','six_read'];
52 $this->order = 'sort'; 52 $this->order = 'sort';
53 $query = $product->orderBy($this->order ,'desc')->orderBy('id','desc'); 53 $query = $product->orderBy($this->order ,'desc')->orderBy('id','desc');
@@ -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);