...
|
...
|
@@ -230,14 +230,16 @@ class Car extends Base |
|
|
$IDcard = $this->request->param("IDcard");
|
|
|
$phone = $this->request->param("phone");
|
|
|
$is_adult = $this->request->param("is_adult");
|
|
|
if(!$this->auth->id){
|
|
|
$user_id = $this->auth->id;
|
|
|
print_r($user_id);return;
|
|
|
if(!$user_id){
|
|
|
$this->error("添加失败,token失效。".$this->auth->id);
|
|
|
}
|
|
|
$res = Db::name("passenger")->insert([
|
|
|
"name" => $name,
|
|
|
"IDcard" => $IDcard,
|
|
|
"phone" => $phone,
|
|
|
"user_id" => $this->auth->id,
|
|
|
"user_id" => $user_id,
|
|
|
"is_adult" => $is_adult
|
|
|
]);
|
|
|
return $this->success("添加成功", $res);
|
...
|
...
|
|