diff --git a/app/controller/Donation.php b/app/controller/Donation.php index 46ecb0b..9862c0d 100644 --- a/app/controller/Donation.php +++ b/app/controller/Donation.php @@ -65,10 +65,10 @@ class Donation $result['lastIndex'] = 0; $result['total'] = 0; $result['list'] = []; - $list = Db::name("order")->where(['user_id'=>$userid,'status'=>1])->where($where)->order("id desc")->limit(env("page_count"))->select(); - print_r($list); + $list = Db::name("order")->where(['user_id'=>$userid,'status'=>1])->where($where)->order("id desc")->limit(env("page_count"))->select()->toArray(); + if(!empty($list)){ -// $result['total'] = $list->total(); + $result['total'] = Db::name("order")->where(['user_id'=>$userid,'status'=>1])->where($where)->count(); $list = $list->toArray(); $appUser = getAllUsersMessage($list,"user_id","id,nickname"); $studentUser = $this->getStudents($list);