|
|
@@ -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);
|
|
|
}
|
|
|
|
|
|
|