|
|
|
|
@ -37,6 +37,17 @@ class QuestionnaireController extends Controller
|
|
|
|
|
$question_ids = json_decode($question->questions, true);
|
|
|
|
|
$person_info = DB::table('web_user_person')->where('id', $person)->first();
|
|
|
|
|
$list = self::getList($person_info, $question_ids);
|
|
|
|
|
//如果是男性,屏蔽id为99的问题
|
|
|
|
|
$nvxingQuestion=[99,103];
|
|
|
|
|
if($person_info->sex==1){
|
|
|
|
|
$temp=[];
|
|
|
|
|
foreach ($list as $key => $item) {
|
|
|
|
|
if(!in_array($item['id'],$nvxingQuestion)){
|
|
|
|
|
$temp[]=$item;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$list=$temp;
|
|
|
|
|
}
|
|
|
|
|
return \Yz::Return(true, '操作完成', [
|
|
|
|
|
'info' => $question,
|
|
|
|
|
'list' => $list
|
|
|
|
|
|