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

打卡状态编辑

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