Browse Source

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

yingzi 2 years ago
parent
commit
32a87a8a76
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/api/controller/Pub.php

+ 6 - 1
app/api/controller/Pub.php

@@ -331,7 +331,7 @@ class Pub extends BaseController
         $rankList = [];
         foreach ($users as $key => $value) {
             $userInfo = (new UserModel)->where('uid', $value['uid'])->find();
-            $auth = (new InfoAudit)->where('uid',$value['uid'])->find();
+            $auth = (new InfoAudit)->where('uid', $value['uid'])->find();
             $template = $this->getShowTemplateItem($value['uid']);
             $user_work_type_title = (new UserWorkType)->where('id',$auth['user_work_type_id'])->find();
             $rankList[] = [
@@ -347,6 +347,11 @@ class Pub extends BaseController
                 'user_work_type_id' => $user_work_type_title['title'],
             ];
         }
+
+        $rankList = array_filter($rankList, function($item){
+            return !empty($item['ancestral_place']);
+        });
+
         return app('json')->success($rankList);
     }