|
@@ -275,7 +275,9 @@ class Login extends Base
|
|
|
if ($data) {
|
|
|
$mobile = $data['phoneNumber'];
|
|
|
//获取openid和unionid
|
|
|
- $json = (new WechatService(Wechat::miniProgram()))->getWechatSession($logincode);
|
|
|
+ if (!empty($logincode)) {
|
|
|
+ $json = (new WechatService(Wechat::miniProgram()))->getWechatSession($logincode);
|
|
|
+ }
|
|
|
$openid = $json['openid'] ?? '';
|
|
|
$unionid = $json['unionid'] ?? '';
|
|
|
|