wugg 2 years ago
parent
commit
b5daadd3aa
1 changed files with 7 additions and 4 deletions
  1. 7 4
      app/admin/controller/Platform.php

+ 7 - 4
app/admin/controller/Platform.php

@@ -82,10 +82,13 @@ class Platform extends Base
         if($end!==""){
             $where[]=['addtime',"<",date('Y-m-d H:i:s',strtotime($end)+24*3600)];
         }
-        $role=$this->checkRole();
-        if(!empty($role['platform'])){
-            $where[]=["id","in",$role['platform']];
-        }
+        $is_show=isset($this->post['is_show']) && $this->post['is_show']!=="" ? intval($this->post['is_show']):"1";
+           if($is_show==1){
+               $role=$this->checkRole();
+               if(!empty($role['platform'])){
+                   $where[]=["id","in",$role['platform']];
+               }
+           }
         $count = Db::name('platform')->where($where)->count();
         $total = ceil($count / $size);
         $page = $page >= $total ? $total : $page;