Skip to content

Commit

Permalink
二维码失效自动生成新的二维码
Browse files Browse the repository at this point in the history
  • Loading branch information
yxw21 committed Dec 24, 2022
1 parent 5a4e84b commit 7cb09cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ func LoginWithQRCode(saveToken bool) (*client.QQClient, error) {
continue
}
if newQRCodeLoginResponse.State == client.QRCodeCanceled {
log.Println("扫码被用户取消.")
log.Println("扫码被用户取消,重新生成二维码")
return LoginWithQRCode(saveToken)
} else if newQRCodeLoginResponse.State == client.QRCodeTimeout {
log.Println("二维码过期")
log.Println("二维码过期,重新生成二维码")
return LoginWithQRCode(saveToken)
} else if newQRCodeLoginResponse.State == client.QRCodeWaitingForConfirm {
log.Println("扫码成功, 请在手机端确认登录.")
} else if newQRCodeLoginResponse.State == client.QRCodeConfirmed {
Expand Down

0 comments on commit 7cb09cd

Please sign in to comment.