service = $service; } /** * 技师认证-提交基本信息认证 * * @group 技师认证 * * @bodyParam nickname string required 昵称 * @bodyParam avatar string 头像地址 * @bodyParam gender integer required 性别(1:男,2:女) * @bodyParam mobile string required 手机号 * @bodyParam age integer required 年龄(18-60岁) * @bodyParam birthday date 出生日期 Example: 1990-01-01 * @bodyParam work_years integer 工作年限(0-50年) * @bodyParam intention_city string required 意向城市 * @bodyParam introduction string 个人简介(最多1000字) * @bodyParam portrait_images array required 形象照片(1-6张) * @bodyParam portrait_images.* string required 形象照片地址 * * @response { * "code": 0, * "message": "操作成功", * "data": { * "id": 1, * "state": 1, * "state_text": "审核中" * } * } */ public function submitBasicInfo(BasicInfoRequest $request): array { $data = $request->validated(); return $this->success($this->service->submitBasicInfo($data)); } /** * 技师认证-提交实名认证 * * @group 技师认证 * * @bodyParam real_name string required 真实姓名 * @bodyParam id_card string required 身份证号(18位) * @bodyParam id_card_front_photo string required 身份证正面照片 * @bodyParam id_card_back_photo string required 身份���反面照片 * @bodyParam id_card_hand_photo string required 手持身份证照片 * * @response { * "code": 0, * "message": "操作成功", * "data": { * "record": { * "id": 1, * "state": 1, * "state_text": "审核中" * }, * "can_proceed": true, * "message": "实名认证提交成功,系统正在审核,您可以继续提交资质认证" * } * } */ public function submitRealAuth(RealAuthRequest $request): array { $data = $request->validated(); return $this->success($this->service->submitRealAuth($data)); } /** * 技师认证-提交资质认证 * * @group 技师认证 * * @bodyParam qual_type string required 资质类型 * @bodyParam qual_no string 资质证书编号 * @bodyParam qual_photo string required 资质证书照片 * @bodyParam valid_start date 有效期开始日期 Example: 2024-01-01 * @bodyParam valid_end date 有效期结束日期 Example: 2025-01-01 * * @response { * "code": 0, * "message": "操作成功", * "data": { * "record": { * "id": 1, * "state": 1, * "state_text": "审核中" * }, * "warning": "实名认证正在审核中,如审核失败可能需要重新提交资质认证" * } * } */ public function submitQualAuth(QualAuthRequest $request): array { $data = $request->validated(); return $this->success($this->service->submitQualAuth($data)); } /** * 技师认证-获取认证状态 * * @group 技师认证 * * @response { * "code": 0, * "message": "操作成功", * "data": { * "basic_info": { * "state": 1, * "state_text": "审核中" * }, * "real_auth": { * "state": 1, * "state_text": "审核中" * }, * "qual_auth": { * "state": 1, * "state_text": "审核中" * } * } * } */ public function getAuthStatus(): array { return $this->success($this->service->checkAuthStatus()); } }