小程序登录
This commit is contained in:
@@ -98,7 +98,7 @@ class BasicDataService
|
||||
*/
|
||||
private function getAllLoginTypes()
|
||||
{
|
||||
return ['upwd', 'feishu', 'qrcode']; // 示例数据
|
||||
return ['upwd', 'feishu', 'wechat', 'qrcode']; // 示例数据
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -187,7 +187,8 @@ class UserService
|
||||
|
||||
$session = $logic->miniCode2Session($loginCode);
|
||||
if (!isset($session['openid'])) {
|
||||
return json(['code'=>0, 'msg'=>'登录失败', 'data'=>$session]);
|
||||
throw new BusinessException('登录失败');
|
||||
// return json(['code'=>0, 'msg'=>'登录失败', 'data'=>$session]);
|
||||
}
|
||||
|
||||
$openid = $session['openid'];
|
||||
@@ -199,7 +200,8 @@ class UserService
|
||||
$phoneData = $logic->getMiniPhoneNumber($access_token, $phoneCode);
|
||||
|
||||
if (!isset($phoneData['phone_info']['phoneNumber'])) {
|
||||
return json(['code'=>0, 'msg'=>'获取手机号失败', 'data'=>$phoneData]);
|
||||
throw new BusinessException('获取手机号失败');
|
||||
// return json(['code'=>0, 'msg'=>'获取手机号失败', 'data'=>$phoneData]);
|
||||
}
|
||||
|
||||
$phone = $phoneData['phone_info']['phoneNumber'];
|
||||
|
||||
@@ -13,6 +13,7 @@ class WechatService
|
||||
{
|
||||
|
||||
protected array $web;
|
||||
protected array $mini;
|
||||
protected array $login;
|
||||
protected $app;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user