|
@@ -37,7 +37,7 @@ class AuthService
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 检查提交次数限制
|
|
|
+ * 检查提交��数限制
|
|
|
*
|
|
|
* @param string $type 认证类型(basic_info/real_auth/qual_auth)
|
|
|
* @throws \Exception 超出限制时抛出异常
|
|
@@ -215,7 +215,7 @@ class AuthService
|
|
|
/**
|
|
|
* 检查认证状态
|
|
|
*
|
|
|
- * @return array
|
|
|
+ * @return array 返回认证状态和详细信息
|
|
|
*/
|
|
|
public function checkAuthStatus(): array
|
|
|
{
|
|
@@ -248,9 +248,47 @@ class AuthService
|
|
|
};
|
|
|
|
|
|
return [
|
|
|
- 'basic_info' => $getStateInfo($latestInfo),
|
|
|
- 'real_auth' => $getStateInfo($latestRealAuth),
|
|
|
- 'qual_auth' => $getStateInfo($latestQualAuth)
|
|
|
+ 'basic_info' => [
|
|
|
+ ...$getStateInfo($latestInfo),
|
|
|
+ 'detail' => $latestInfo ? [
|
|
|
+ 'nickname' => $latestInfo->nickname,
|
|
|
+ 'avatar' => $latestInfo->avatar,
|
|
|
+ 'gender' => $latestInfo->gender,
|
|
|
+ 'mobile' => $latestInfo->mobile,
|
|
|
+ 'age' => $latestInfo->age,
|
|
|
+ 'birthday' => $latestInfo->birthday,
|
|
|
+ 'work_years' => $latestInfo->work_years,
|
|
|
+ 'intention_city' => $latestInfo->intention_city,
|
|
|
+ 'introduction' => $latestInfo->introduction,
|
|
|
+ 'portrait_images' => $latestInfo->portrait_images,
|
|
|
+ 'created_at' => $latestInfo->created_at,
|
|
|
+ 'updated_at' => $latestInfo->updated_at,
|
|
|
+ ] : null,
|
|
|
+ ],
|
|
|
+ 'real_auth' => [
|
|
|
+ ...$getStateInfo($latestRealAuth),
|
|
|
+ 'detail' => $latestRealAuth ? [
|
|
|
+ 'real_name' => $latestRealAuth->real_name,
|
|
|
+ 'id_card' => $latestRealAuth->id_card,
|
|
|
+ 'id_card_front_photo' => $latestRealAuth->id_card_front_photo,
|
|
|
+ 'id_card_back_photo' => $latestRealAuth->id_card_back_photo,
|
|
|
+ 'id_card_hand_photo' => $latestRealAuth->id_card_hand_photo,
|
|
|
+ 'created_at' => $latestRealAuth->created_at,
|
|
|
+ 'updated_at' => $latestRealAuth->updated_at,
|
|
|
+ ] : null,
|
|
|
+ ],
|
|
|
+ 'qual_auth' => [
|
|
|
+ ...$getStateInfo($latestQualAuth),
|
|
|
+ 'detail' => $latestQualAuth ? [
|
|
|
+ 'qual_type' => $latestQualAuth->qual_type,
|
|
|
+ 'qual_no' => $latestQualAuth->qual_no,
|
|
|
+ 'qual_photo' => $latestQualAuth->qual_photo,
|
|
|
+ 'valid_start' => $latestQualAuth->valid_start,
|
|
|
+ 'valid_end' => $latestQualAuth->valid_end,
|
|
|
+ 'created_at' => $latestQualAuth->created_at,
|
|
|
+ 'updated_at' => $latestQualAuth->updated_at,
|
|
|
+ ] : null,
|
|
|
+ ],
|
|
|
];
|
|
|
}
|
|
|
|