diff --git a/app/service/user/LoginService.php b/app/service/user/LoginService.php index 960e5be..7ca45d3 100644 --- a/app/service/user/LoginService.php +++ b/app/service/user/LoginService.php @@ -112,7 +112,7 @@ class LoginService extends BaseService $field = 'id,openid,phone,nickname,sex,headimgurl'; $user = WechatUser::where('phone', $phone)->where('delete_time', 0)->field($field)->find(); if ($openid != $user->openid) { - WechatUser::where('id', $user->id)->save(['openid' => $user->openid, 'unionid' => $unionid]); + WechatUser::where('id', $user->id)->save(['openid' => $user->openid, 'unionid' => $unionid ?? '']); } if ($user) { return $this->userSuccess($user); diff --git a/app/service/user/SmsService.php b/app/service/user/SmsService.php index ae8c1f0..97275bb 100644 --- a/app/service/user/SmsService.php +++ b/app/service/user/SmsService.php @@ -90,6 +90,7 @@ class SmsService // 设置POST字段 curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); // 设置HTTP头 + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //todo::增加改行 // 执行cURL会话 $response = curl_exec($ch);