|
|
|
|
@ -56,6 +56,19 @@ class QuestionController extends Controller
|
|
|
|
|
$openid = request('openid');
|
|
|
|
|
$person_id = request('person_id');
|
|
|
|
|
$content = request('content');
|
|
|
|
|
$user = DB::table('web_users')->where(['openid' => $openid, 'status' => 1, 'is_del' => 0])->first();
|
|
|
|
|
if (!$user) return \Yz::echoError1('用户不存在');
|
|
|
|
|
$data=[
|
|
|
|
|
'userid'=>$user->id,
|
|
|
|
|
'q_type'=>3,
|
|
|
|
|
'content'=>!empty($content)?json_encode($content,JSON_UNESCAPED_UNICODE):[]
|
|
|
|
|
];
|
|
|
|
|
$i=DB::table('questions_log')->insert($data);
|
|
|
|
|
if($i){
|
|
|
|
|
return \Yz::Return(true,"提交成功",[]);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::echoError1('提交失败');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|