fix bug
This commit is contained in:
@@ -62,16 +62,23 @@ class Help
|
|||||||
}
|
}
|
||||||
$student_id = $GLOBALS['data']['data']['student_id'];
|
$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();
|
$lastIndex = lastindex();
|
||||||
if($lastIndex == 0) {
|
if($lastIndex == 0) {
|
||||||
$lastIndex = 1;
|
$lastIndex = 1;
|
||||||
}
|
}
|
||||||
$result = [];
|
$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 = Db::name("appHelp")->where("student_id",$student_id)->limit(env("page_count"))->order('count desc')->paginate([
|
||||||
"list_rows"=>env("PAGE_COUNT"),
|
"list_rows"=>env("PAGE_COUNT"),
|
||||||
"page"=>$lastIndex
|
"page"=>$lastIndex
|
||||||
|
|||||||
Reference in New Issue
Block a user