逻辑优化

main
limu 9 months ago
parent ef19adbb26
commit f563d159df
  1. 6
      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();

Loading…
Cancel
Save