Quellcode durchsuchen

2023-5-22-1 新增服务区-2

yingzi vor 1 Jahr
Ursprung
Commit
e5aee26f9d
1 geänderte Dateien mit 10 neuen und 9 gelöschten Zeilen
  1. 10 9
      app/model/api/User.php

+ 10 - 9
app/model/api/User.php

@@ -261,7 +261,8 @@ class User extends BaseModel
         $post["page"]     = $post["page"]<=0     ? 1  : (int)$post["page"];
         $where=[];
         $where[]=["u.work_type_id",">",0];
-        $where[]=["u.status","=",1];
+        $where[]=["u.s","=",1];
+        $where[]=["a.is_show","=",1];
         if(!empty($post['work_type_id'])){
             $where[]=["u.work_type_id","=",$post['work_type_id']];
         }
@@ -301,14 +302,14 @@ class User extends BaseModel
                 $data[$k] = array_merge($v,$item);
             }
         }
-        $datatwo = [];
-        foreach($data as $v){
-            if($v['is_show'] == 1){
-                $datatwo[] = $v;
-            }
-        }
-        $datatwo = empty($datatwo)?[]:$data;
-        return ["list" => $datatwo, "pageSize" => $post["pageSize"],"page"=>$post["page"],"totalCount"=>$totalCount];
+//        $datatwo = [];
+//        foreach($data as $v){
+//            if($v['is_show'] == 1){
+//                $datatwo[] = $v;
+//            }
+//        }
+        $data = empty($data)?[]:$data;
+        return ["list" => $data, "pageSize" => $post["pageSize"],"page"=>$post["page"],"totalCount"=>$totalCount];
     }