Ver Fonte

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

yingzi há 2 anos atrás
pai
commit
f9ba6db9e0
1 ficheiros alterados com 1 adições e 12 exclusões
  1. 1 12
      app/api/controller/User.php

+ 1 - 12
app/api/controller/User.php

@@ -141,8 +141,6 @@ class User extends BaseController
         foreach ($users as $key => $value) {
             $userInfo = (new UserModel)->where('uid', $value['uid'])->find();
             $auth = (new InfoAudit)->where('uid', $value['uid'])->find();
-            $other = new \app\api\controller\Pub($this->app, $request);
-            $template = $other->getShowTemplateItem($value['uid']);
             $user_work_type_title = (new UserWorkType)->where('id', $auth['user_work_type_id'])->find();
             $rankList[] = [
                 'rank' => $key + 1,
@@ -150,7 +148,6 @@ class User extends BaseController
                 'nickname' => $userInfo['nickname'],
                 'avatar' => $userInfo['avatar'],
                 'invite_count' => $value['invite_count'],
-                'template' => $template['inviter_ranking'] ?? '',
                 'is_type_audit' => $auth && $auth['status'] == 1 ? 1 : 0,
                 'ancestral_place' => $auth ? $auth['ancestral_place'] : '',
                 'auth_info' => $auth ? $auth->toArray() : [],
@@ -162,15 +159,7 @@ class User extends BaseController
             return !empty($item['ancestral_place']);
         }));
 
-        $result = $rankList;
-        if (is_object($result)) {
-            $result = $result->toArray();
-        } elseif (is_object($result[0])) {
-            $collection = app('collection', [$result]);
-            $result = $collection->toArray();
-        }
-
-        return app('json')->success($result);
+        return app('json')->success($rankList);
     }