diff --git a/app/controller/api/user/User.php b/app/controller/api/user/User.php index 05f203e..5afee1e 100644 --- a/app/controller/api/user/User.php +++ b/app/controller/api/user/User.php @@ -422,7 +422,7 @@ class User extends BaseController ->where('ctime', '<=', $end) ->count(); - if (!empty($count) && $count > 10) { + if (!empty($count) && $count >= 10) { return app('json')->fail('达到上限'); } //加100分 @@ -455,7 +455,7 @@ class User extends BaseController ->where('ctime', '<=', $end) ->count(); - if (!empty($count) && $count > 10) { + if (!empty($count) && $count >= 10) { return app('json')->fail('达到上限'); } } @@ -490,7 +490,7 @@ class User extends BaseController $query->where('type', $type); } - $list = $query->page((int)$this->request->param('page'), $this->request->param('limit'))->select()->toArray(); + $list = $query->order('id desc')->page((int)$this->request->param('page'), $this->request->param('limit'))->select()->toArray(); $user = userModel::getDB()->where('uid', $this->user->uid)->find();