...
|
...
|
@@ -721,17 +721,51 @@ class Car extends Base |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 提现金额列表
|
|
|
* @return void
|
|
|
*/
|
|
|
public function withdrawallist(){
|
|
|
$user_money_log=Db::name("user_money_log");
|
|
|
$page=Db::name("page");
|
|
|
$total=Db::name("total");
|
|
|
$page=$this->request->param("page");
|
|
|
$total=$this->request->param("total");
|
|
|
$user_money_log=Db::name("user_money_log")
|
|
|
->where("user_id",$this->auth->id)
|
|
|
->page($page,$total)
|
|
|
->select();
|
|
|
return $this->success("请求成功",$user_money_log);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 司机认证
|
|
|
* @return void
|
|
|
*/
|
|
|
public function driverauthentication(){
|
|
|
$license_plate=$this->request->param("license_plate");//车牌号
|
|
|
$car_model=$this->request->param("car_model");//车型
|
|
|
$colour=$this->request->param("colour");//颜色
|
|
|
$name=$this->request->param("name");//名字
|
|
|
$driving_license=$this->request->param("driving_license");//行驶证
|
|
|
$driver_license=$this->request->param("driver_license");//驾照
|
|
|
//判断是否已有
|
|
|
$isdriver=Db::name("driver")->where("user_id",$this->auth->id)->find();
|
|
|
if($isdriver){
|
|
|
return $this->error("已认证");
|
|
|
}
|
|
|
$driver=Db::name("driver")
|
|
|
->insertGetId([
|
|
|
"user_id"=>$this->auth->id,
|
|
|
"name"=>$name,
|
|
|
"phone"=>$this->auth->mobile
|
|
|
]);
|
|
|
$res=Db::name("car")
|
|
|
->insert([
|
|
|
"license_plate"=>$license_plate,
|
|
|
"car_model"=>$car_model,
|
|
|
"colour"=>$colour,
|
|
|
"driver_id"=>$driver,
|
|
|
"driving_license"=>$driving_license,
|
|
|
"driver_license"=>$driver_license,
|
|
|
"status"=>2,
|
|
|
]);
|
|
|
return $this->success("请求成功",$res);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|