Browse Source

验证码不验证ssl证书

master
wanghongjun 1 year ago
parent
commit
400da48237
  1. 2
      app/service/user/LoginService.php
  2. 1
      app/service/user/SmsService.php

2
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);

1
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);

Loading…
Cancel
Save