|
|
|
|
@ -174,6 +174,40 @@ class AuthController extends Controller
|
|
|
|
|
return response()->json($manager->toArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Post(
|
|
|
|
|
* path="/manager/update",
|
|
|
|
|
* summary="V2-登录者个人信息修改",
|
|
|
|
|
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
|
|
|
|
|
* @OA\Parameter(name="name", in="query", @OA\Schema(type="string"), required=false, description="姓名"),
|
|
|
|
|
* @OA\Parameter(name="sex", in="query", @OA\Schema(type="string"), required=false, description="性别:[男,女]"),
|
|
|
|
|
* @OA\Parameter(name="password", in="query", @OA\Schema(type="string"), required=false, description="密码"),
|
|
|
|
|
* @OA\Parameter(name="openid", in="query", @OA\Schema(type="string"), required=false, description="微信openid"),
|
|
|
|
|
* @OA\Parameter(name="unionid", in="query", @OA\Schema(type="string"), required=false, description="微信unionid"),
|
|
|
|
|
* @OA\Parameter(name="mobile", in="query", @OA\Schema(type="string"), required=false, description="手机号码"),
|
|
|
|
|
* @OA\Parameter(name="birthday", in="query", @OA\Schema(type="string"), required=false, description="生日"),
|
|
|
|
|
* @OA\Parameter(name="avatar", in="query", @OA\Schema(type="string"), required=false, description="头像访问路径(相对于根目录的绝对路径)"),
|
|
|
|
|
* description="",
|
|
|
|
|
* @OA\Response(
|
|
|
|
|
* response="200",
|
|
|
|
|
* description="登录者个人信息修改"
|
|
|
|
|
* )
|
|
|
|
|
* )
|
|
|
|
|
*/
|
|
|
|
|
public function update()
|
|
|
|
|
{
|
|
|
|
|
$manager = $this->guard()->user();
|
|
|
|
|
$fillable = (new Manager())->getFillable();
|
|
|
|
|
$update = [];
|
|
|
|
|
foreach (request()->all() as $k => $v) {
|
|
|
|
|
if (in_array($k,$fillable)) {
|
|
|
|
|
$update[$k] = $v;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$manager->update($update);
|
|
|
|
|
return response()->json($manager->toArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Post(
|
|
|
|
|
* path="/manager/logout",
|
|
|
|
|
|