From 400da4823785d7297d11f4dc0e52a54d1890e56d Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Fri, 10 Jan 2025 17:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E4=B8=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81ssl=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/user/LoginService.php | 2 +- app/service/user/SmsService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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);