|
@@ -86,7 +86,7 @@ class User extends Permissions
|
|
|
}
|
|
|
|
|
|
//检测预约号源是否可预约
|
|
|
- $ticket = AppointmentTicket::get($post['appointment_ticket_id']);
|
|
|
+ $ticket = (new AppointmentTicket())->where(['id' => $post['appointment_ticket_id'], 'status' => AppointmentTicket::STATUS_OPEN])->find();
|
|
|
if (!$ticket) {
|
|
|
$this->json_error("获取预约号失败");
|
|
|
}
|
|
@@ -122,29 +122,29 @@ class User extends Permissions
|
|
|
|
|
|
//入库
|
|
|
$data = [
|
|
|
- 'name' => $post['name'],
|
|
|
+ 'name' => htmlspecialchars($post['name']),
|
|
|
'user_id' => $this->getUserId(),
|
|
|
'age' => $post['age']??0,
|
|
|
- 'birthday' => $post['birthday']??'',
|
|
|
+ 'birthday' => $this->request->param('birthday', '', 'htmlspecialchars'),
|
|
|
'sex' => $post['sex']??0,
|
|
|
'phone' => $post['phone'],
|
|
|
- 'id_card' => $post['id_card']??'',
|
|
|
+ 'id_card' => $this->request->param('id_card', '', 'htmlspecialchars'),
|
|
|
'childs_num' => $post['childs_num']??0,
|
|
|
- 'problem_desc' => $post['problem_desc']??'',
|
|
|
- 'requirement_desc' => $post['requirement_desc']??'',
|
|
|
+ 'problem_desc' => $this->request->param('problem_desc', '', 'htmlspecialchars'),
|
|
|
+ 'requirement_desc' => $this->request->param('requirement_desc', '', 'htmlspecialchars'),
|
|
|
'address_id' => $ticket->address_id,
|
|
|
'provider_id' => $ticket->provider_id,
|
|
|
'appointment_ticket_id' => $post['appointment_ticket_id'],
|
|
|
'appointment_time' => $post['appointment_time'],
|
|
|
'appointment_period' => $post['appointment_period'],
|
|
|
'status' => AppointmentApplication::STATUS_NOT_SIGN,
|
|
|
- 'city' => $post['city']??'',
|
|
|
- 'job' => $post['job']??'',
|
|
|
+ 'city' => $this->request->param('city', '', 'htmlspecialchars'),
|
|
|
+ 'job' => $this->request->param('job', '', 'htmlspecialchars'),
|
|
|
'education_level' => $post['education_level']??0,
|
|
|
- 'home_address' => $post['home_address']??'',
|
|
|
+ 'home_address' => $this->request->param('home_address', '', 'htmlspecialchars'),
|
|
|
'marriage' => $post['marriage']??0,
|
|
|
'problem_type' => $post['problem_type']??0,
|
|
|
- 'childs_num_str' => $post['childs_num_str']??'',
|
|
|
+ 'childs_num_str' => $this->request->param('childs_num_str', '', 'htmlspecialchars'),
|
|
|
'childs_age1' => $post['childs_age1']??0,
|
|
|
'childs_age2' => $post['childs_age2']??0,
|
|
|
'childs_age3' => $post['childs_age3']??0,
|
|
@@ -211,7 +211,7 @@ class User extends Permissions
|
|
|
$model = new Feedback();
|
|
|
$data = [
|
|
|
'user_id' => $this->getUserId(),
|
|
|
- 'content' => $post['content']
|
|
|
+ 'content' => $this->request->param('content', '', 'htmlspecialchars')
|
|
|
];
|
|
|
if (false === $model->allowField(true)->save($data)) {
|
|
|
$this->json_error("失败");
|