Explorar el Código

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

yingzi hace 1 año
padre
commit
44452f9ab8
Se han modificado 1 ficheros con 15 adiciones y 9 borrados
  1. 15 9
      app/model/api/User.php

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

@@ -301,8 +301,14 @@ class User extends BaseModel
                 $data[$k] = array_merge($v,$item);
             }
         }
-        $data = empty($data)?[]:$data;
-        return ["list" => $data, "pageSize" => $post["pageSize"],"page"=>$post["page"],"totalCount"=>$totalCount];
+        $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];
     }
 
 
@@ -379,13 +385,13 @@ class User extends BaseModel
                 $data[$k]["parent_time"]  = date("Y-m-d H:i:s",$v["parent_time"]);
             }
         }
-        $datatwo = [];
-        foreach($data as $v){
-            if($v['is_show'] == 1){
-                $datatwo[] = $v;
-            }
-        }
-        return ["list" => $datatwo, "pageSize" => $post["pageSize"],"page"=>$post["page"],"totalCount"=>$totalCount];
+//        $datatwo = [];
+//        foreach($data as $v){
+//            if($v['is_show'] == 1){
+//                $datatwo[] = $v;
+//            }
+//        }
+        return ["list" => $data, "pageSize" => $post["pageSize"],"page"=>$post["page"],"totalCount"=>$totalCount];
     }
     
     /**