作者 sgj
1 个管道 的构建 失败 耗费 0 秒

打卡状态编辑

... ... @@ -347,6 +347,7 @@ class SecondController extends RestBaseController
$answer_info1= htmlspecialchars_decode($answer_info);
$answer_array=json_decode($answer_info1,true);
$ClassQuesion=new ClassQuestionModel();
$class=db('class')->where('id',$class_id)->find();
$question=$ClassQuesion->getClassQuesion($class_id);
foreach ($question as $k=>$v){
$answer[$v['id']]=$v['answer'];
... ... @@ -362,12 +363,12 @@ class SecondController extends RestBaseController
/*添加信息*/
/*添加用户时长*/
$volunteer=new VolunteerModel();
$volunteer->where('user_id',$user_id)->setInc('work_time',$question['study_time']);
$volunteer->addWorkTime($user_id,$question['work_time']);
$volunteer->where('user_id',$user_id)->setInc('work_time',$class['study_time']);
$volunteer->addWorkTime($user_id,$class['study_time']);
/*添加到完成*/
$UserPassModel=new UserPassModel();
$UserPassModel->pass($user_id,$class_id);
$return['time']=$question['study_time'];
$return['time']=$class['study_time'];
$this->success('回答成功',$return);
}else{
$info['answer']=$ClassQuesion->getClassQuesion($class_id);
... ...