hrjy 2 лет назад
Родитель
Сommit
a4ff5df0e4
2 измененных файлов с 6 добавлено и 4 удалено
  1. 1 1
      app/admin/controller/user/UserAuth.php
  2. 5 3
      app/admin/model/user/User.php

+ 1 - 1
app/admin/controller/user/UserAuth.php

@@ -103,7 +103,7 @@ class UserAuth extends AuthController
        $where =UtilService::getMore([
            ['page', 1],
            ['limit', 20],
-		   ['is_auth','<>',0]
+		   ['is_show','<>',0]
        ]);
         return JsonService::successlayui(UserModel::authlist($where));
     }

+ 5 - 3
app/admin/model/user/User.php

@@ -141,11 +141,13 @@ class User extends BaseModel
     // 获取用户实名认证信息列表
     public static function authlist($where) {
         $model = self::where('is_auth','>',0);
-        if ($where['is_auth'] == 1){
+        if ($where['is_show'] == 1){
             $model->where('is_auth', '=',1);
-        }elseif ($where['is_auth'] == 2){
+        }elseif ($where['is_show'] == 2){
             $model->where('is_auth', '=',2);
         }
+        $list['count'] = $model->count();
+
         $list['data'] = $model->page((int)$where['page'], (int)$where['limit'])->select();
         foreach ($list['data'] as $i => $v){
             if($v['is_auth']==1){
@@ -158,7 +160,7 @@ class User extends BaseModel
                 $list['data'][$i]['is_auth']="已拒绝";
             }
         }
-        $list['count'] = self::where('is_auth','<>',0)->count();
+
         return $list;
 
     }