正在显示
1 个修改的文件
包含
37 行增加
和
3 行删除
@@ -721,17 +721,51 @@ class Car extends Base | @@ -721,17 +721,51 @@ class Car extends Base | ||
721 | } | 721 | } |
722 | 722 | ||
723 | /** | 723 | /** |
724 | + * 提现金额列表 | ||
724 | * @return void | 725 | * @return void |
725 | */ | 726 | */ |
726 | public function withdrawallist(){ | 727 | public function withdrawallist(){ |
727 | - $user_money_log=Db::name("user_money_log"); | ||
728 | - $page=Db::name("page"); | ||
729 | - $total=Db::name("total"); | 728 | + $page=$this->request->param("page"); |
729 | + $total=$this->request->param("total"); | ||
730 | $user_money_log=Db::name("user_money_log") | 730 | $user_money_log=Db::name("user_money_log") |
731 | ->where("user_id",$this->auth->id) | 731 | ->where("user_id",$this->auth->id) |
732 | ->page($page,$total) | 732 | ->page($page,$total) |
733 | ->select(); | 733 | ->select(); |
734 | return $this->success("请求成功",$user_money_log); | 734 | return $this->success("请求成功",$user_money_log); |
735 | + } | ||
735 | 736 | ||
737 | + /** | ||
738 | + * 司机认证 | ||
739 | + * @return void | ||
740 | + */ | ||
741 | + public function driverauthentication(){ | ||
742 | + $license_plate=$this->request->param("license_plate");//车牌号 | ||
743 | + $car_model=$this->request->param("car_model");//车型 | ||
744 | + $colour=$this->request->param("colour");//颜色 | ||
745 | + $name=$this->request->param("name");//名字 | ||
746 | + $driving_license=$this->request->param("driving_license");//行驶证 | ||
747 | + $driver_license=$this->request->param("driver_license");//驾照 | ||
748 | + //判断是否已有 | ||
749 | + $isdriver=Db::name("driver")->where("user_id",$this->auth->id)->find(); | ||
750 | + if($isdriver){ | ||
751 | + return $this->error("已认证"); | ||
752 | + } | ||
753 | + $driver=Db::name("driver") | ||
754 | + ->insertGetId([ | ||
755 | + "user_id"=>$this->auth->id, | ||
756 | + "name"=>$name, | ||
757 | + "phone"=>$this->auth->mobile | ||
758 | + ]); | ||
759 | + $res=Db::name("car") | ||
760 | + ->insert([ | ||
761 | + "license_plate"=>$license_plate, | ||
762 | + "car_model"=>$car_model, | ||
763 | + "colour"=>$colour, | ||
764 | + "driver_id"=>$driver, | ||
765 | + "driving_license"=>$driving_license, | ||
766 | + "driver_license"=>$driver_license, | ||
767 | + "status"=>2, | ||
768 | + ]); | ||
769 | + return $this->success("请求成功",$res); | ||
736 | } | 770 | } |
737 | } | 771 | } |
-
请 注册 或 登录 后发表评论