作者 赵彬吉
... ... @@ -47,7 +47,7 @@ class ProductController extends BaseController
*/
public function index(Product $product)
{
$filed = ['id', 'project_id', 'title', 'sort' ,'thumb' ,'product_type' , 'route' ,
$filed = ['id', 'project_id', 'title', 'sort' ,'thumb' ,'product_type' , 'route' , 'intro' , 'content' ,
'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at','six_read'];
$this->order = 'sort';
$query = $product->orderBy($this->order ,'desc')->orderBy('id','desc');
... ...
... ... @@ -219,7 +219,11 @@ class BlogLogic extends BaseLogic
if($v == 3){
$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();
if($v == 0){
$data[$k] = $this->model->formatQuery(['status' => ['in',[0,3]], 'project_id' => $this->user['project_id']])->count();
}else{
$data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count();
}
}
}
return $this->success($data);
... ...
... ... @@ -236,7 +236,11 @@ class NewsLogic extends BaseLogic
if ($v == 3) {
$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();
if($v == 0){
$data[$k] = $this->model->formatQuery(['status' => ['in',[0,3]], 'project_id' => $this->user['project_id']])->count();
}else{
$data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count();
}
}
}
return $this->success($data);
... ...