feat : login
This commit is contained in:
@@ -33,16 +33,15 @@ class WxFastLoginService extends LoginBaseService
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws RedisException
|
||||
*/
|
||||
public function handle(): array
|
||||
{
|
||||
$jsCode = $this->request->input('js_code');
|
||||
$this->jsCode = $this->request->input('js_code');
|
||||
$phoneCode = $this->request->input('phone_code');
|
||||
|
||||
if (empty($jsCode) || empty($phoneCode)) throw new ErrException('登录参数错误');
|
||||
if (empty($this->jsCode) || empty($phoneCode)) throw new ErrException('登录参数错误');
|
||||
|
||||
$wxInfo = $this->jsCodeGetOpenId($jsCode);
|
||||
$wxInfo = $this->jsCodeGetOpenId($this->jsCode);
|
||||
$this->openId = $wxInfo['openid'];
|
||||
$this->unionId = $wxInfo['unionid'] ?? '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user