Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果我不想获取二维码后堵塞直到扫描咋办 #23

Open
2488583886 opened this issue Sep 23, 2018 · 2 comments
Open

如果我不想获取二维码后堵塞直到扫描咋办 #23

2488583886 opened this issue Sep 23, 2018 · 2 comments

Comments

@2488583886
Copy link

$this->cookies = new CookieJar();
$qrSign = $this->makeQrCodeImage($loginQRImage);
$ptQrToken = Utils::hash33($qrSign);
while (true) {
$status = $this->verifyQrCodeStatus($ptQrToken);
我试了下,我把那个$ptQrToken保存,然后用js定时器来请求,每秒判断一次,可会报错

@slince
Copy link
Owner

slince commented Sep 24, 2018

不验证登录其他操作根本没法进行,我不知道你这么玩有什么意义

@mlsjla
Copy link

mlsjla commented Sep 26, 2018

报错可以用try 来进行处理。

你可以通过异步来防止阻塞。开两个进程, 一个负责主逻辑,提示用户扫码,或者发送二维码到邮件,或者发送带二维码的短信之类都行,一个负责生成二维码然后阻塞获取认证信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants