This commit is contained in:
knowpia
2022-09-19 08:38:23 +08:00
parent 1050a87759
commit 13ac484711

View File

@@ -139,6 +139,22 @@ class Article
if(count($list)<env("PAGE_COUNT")){
$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);
}
}