This commit is contained in:
knowpia
2022-09-14 10:52:30 +08:00
parent d62c3d23de
commit b035692492

View File

@@ -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