fix bug
This commit is contained in:
@@ -139,6 +139,22 @@ class Article
|
|||||||
if(count($list)<env("PAGE_COUNT")){
|
if(count($list)<env("PAGE_COUNT")){
|
||||||
$result["lastIndex"] = 0;
|
$result["lastIndex"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result['is_assist'] = 0;
|
||||||
|
$userid = $GLOBALS['data']['userid'];
|
||||||
|
if(!empty($userid)){
|
||||||
|
$data = [
|
||||||
|
"userid"=>$GLOBALS['data']['userid'],
|
||||||
|
"student_id"=>$student_userid,
|
||||||
|
"createtime"=>date("Y-m-d",time())
|
||||||
|
];
|
||||||
|
$data['sha'] = sha1(json_encode($data));
|
||||||
|
$info = Db::name("app_help_log")->where("sha", $data['sha'])->find();
|
||||||
|
if (!empty($info)) {
|
||||||
|
$result['is_assist'] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return show(SUCCESS_MESSAGE,SUCCESS_CODE,$result);
|
return show(SUCCESS_MESSAGE,SUCCESS_CODE,$result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user