Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
3 个修改的文件
包含
10 行增加
和
2 行删除
| @@ -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,9 +236,13 @@ class NewsLogic extends BaseLogic | @@ -236,9 +236,13 @@ 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 | + if($v == 0){ | ||
| 240 | + $data[$k] = $this->model->formatQuery(['status' => ['in',[0,3]], 'project_id' => $this->user['project_id']])->count(); | ||
| 241 | + }else{ | ||
| 239 | $data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count(); | 242 | $data[$k] = $this->model->where(['status' => $v, 'project_id' => $this->user['project_id']])->count(); |
| 240 | } | 243 | } |
| 241 | } | 244 | } |
| 245 | + } | ||
| 242 | return $this->success($data); | 246 | return $this->success($data); |
| 243 | } | 247 | } |
| 244 | 248 |
-
请 注册 或 登录 后发表评论