diff --git a/app/controller/Help.php b/app/controller/Help.php index 1289724..9951210 100644 --- a/app/controller/Help.php +++ b/app/controller/Help.php @@ -62,16 +62,23 @@ class Help } $student_id = $GLOBALS['data']['data']['student_id']; - $info = Db::name("student")->where("id",$student_id)->field("id")->find(); - if(empty($info)){ - return show("找不到该学生信息!"); - } $lastIndex = lastindex(); if($lastIndex == 0) { $lastIndex = 1; } $result = []; + + + $result['userinfo'] = []; + if($lastIndex==0) { + $userinfo = Db::name("student")->where("id", $student_id)->field("id,nickname,identifier,avatar,age,type,disabled as is_disabled,city,school,hot,hot_count")->find(); + if (!empty($userinfo)) { + $result['userinfo'] = $userinfo; + } + } + + $list = Db::name("appHelp")->where("student_id",$student_id)->limit(env("page_count"))->order('count desc')->paginate([ "list_rows"=>env("PAGE_COUNT"), "page"=>$lastIndex