新增了字段返回
Some checks failed
Build Docker / build (push) Has been cancelled

This commit is contained in:
wucongxing8150 2025-09-04 13:01:00 +08:00
parent b72110fd2a
commit bde4ef5a0f
4 changed files with 32 additions and 2 deletions

View File

@ -25,6 +25,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property string $id_card_front 身份证正面图片
* @property string $id_card_back 身份证背面图片
* @property string $sign_image 签名图片
* @property string $register_cert 电子注册证图片
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
@ -40,7 +41,7 @@ class UserDoctorInfo extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['doctor_info_id', 'user_id', 'doctor_id', 'card_type', 'card_name', 'card_name_mask', 'card_num', 'card_num_mask', 'license_cert', 'qualification_cert', 'qualification_cert_num', 'work_cert', 'multi_point_images', 'id_card_front', 'id_card_back', 'sign_image', 'created_at', 'updated_at'];
protected array $fillable = ['doctor_info_id', 'user_id', 'doctor_id', 'card_type', 'card_name', 'card_name_mask', 'card_num', 'card_num_mask', 'license_cert', 'qualification_cert', 'qualification_cert_num', 'work_cert', 'multi_point_images', 'id_card_front', 'id_card_back', 'sign_image', 'register_cert', 'created_at', 'updated_at'];
protected string $primaryKey = "doctor_info_id";

View File

@ -2378,6 +2378,16 @@ class UserDoctorService extends BaseService
$userDoctorService = new UserDoctorService();
$result['multi_point_enable'] = $userDoctorService->getDoctorMultiPointEnable($doctor_id);
// 获取医生详情数据
$result['register_cert'] = "";
$params = array();
$params['doctor_id'] = $user_doctor['doctor_id'];
$user_doctor_info = UserDoctorInfo::getOne($params);
if (!empty($user_doctor_info)){
if (!empty($user_doctor_info["register_cert"])){
$result['register_cert'] = addAliyunOssWebsite($user_doctor_info["register_cert"]);
}
}
return success($result);
}

View File

@ -35,4 +35,24 @@ class HttpRequest
return json_decode($response->getBody(),true);
}
/**
* 请求封装
* post请求
* @param string $path
* @param array $option
* @return array
* @throws GuzzleException
*/
public function getRequest(string $path, array $option = []): array
{
$response = $this->client->get($path, $option);
if ($response->getStatusCode() != '200'){
// 请求失败
throw new BusinessException(HttpEnumCode::SERVER_ERROR,$response->getBody()->getContents());
}
return json_decode($response->getBody(),true);
}
}

View File

@ -231,7 +231,6 @@ class Wechat
if ($response->isFailed()) {
// 出错了,处理异常
$result = $response->toArray();
dump($result);
if(empty($result)){
// 返回值为空
return [];