正在显示
1 个修改的文件
包含
19 行增加
和
0 行删除
@@ -1720,4 +1720,23 @@ class Car extends Base | @@ -1720,4 +1720,23 @@ class Car extends Base | ||
1720 | $this->success("取消成功"); | 1720 | $this->success("取消成功"); |
1721 | } | 1721 | } |
1722 | } | 1722 | } |
1723 | + | ||
1724 | + /** | ||
1725 | + * 更新用户信息 | ||
1726 | + * @return void | ||
1727 | + * @throws \think\db\exception\DataNotFoundException | ||
1728 | + * @throws \think\db\exception\ModelNotFoundException | ||
1729 | + * @throws \think\exception\DbException | ||
1730 | + */ | ||
1731 | + public function renewuser(){ | ||
1732 | + $user_id=$this->auth->id; | ||
1733 | + $return_data = $this->auth->getUserinfo(); | ||
1734 | + //判断是否是司机 | ||
1735 | + $driver=Db::name("driver")->where("user_id",$user_id)->find(); | ||
1736 | + $return_data['driver_type']=0; | ||
1737 | + if($driver){ | ||
1738 | + $return_data['driver_type']=1; | ||
1739 | + } | ||
1740 | + $this->success('查询用户信息成功',$return_data); | ||
1741 | + } | ||
1723 | } | 1742 | } |
-
请 注册 或 登录 后发表评论