Procházet zdrojové kódy

用户贡献值信息页面,增加返回是否普通用户字段

sunxiaobiao před 1 rokem
rodič
revize
0b667be52e
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      app/controller/api/user/User.php

+ 5 - 1
app/controller/api/user/User.php

@@ -319,12 +319,16 @@ class User extends BaseController
319 319
             $this->repository->setUserIdentity($user->uid);
320 320
             $result = $this->repository->getUserContributeInfoByDepth($user->uid, $number);
321 321
             $con = DB::name('user')->where('uid', $user->uid)->find();
322
+            $isNormalUser = false;
323
+            if ($con['user_group'] == 1) {
324
+                $isNormalUser = true;
325
+            }
322 326
             $data = [
323 327
                 'no_total_source' => Db::name('user_sign_gongxian')->where('status', -1)->where('uid', $user->uid)->sum('number'),
324 328
                 'team_gongxian_num' => $result['arriveNumTeam'],
325 329
                 'zhitui' => $result['perContribute'],
326 330
                 'total_source' => $result['contribute'],
327
-                'user_group' => $con['user_group']
331
+                'isNormalUser' => $isNormalUser
328 332
             ];
329 333
             return app('json')->success($data);
330 334