From 0b956948a120d2124be07f639f70b2fc10a85468 Mon Sep 17 00:00:00 2001 From: johlanse Date: Mon, 27 Dec 2021 18:57:41 +0800 Subject: [PATCH] fix: fix bug #18 --- lib/core.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core.go b/lib/core.go index 1ae1863..2db8f4b 100644 --- a/lib/core.go +++ b/lib/core.go @@ -178,10 +178,11 @@ func (c *Core) Login() ([]Cookie, error) { c.Push("image", base64.StdEncoding.EncodeToString(buffer.Bytes())) os.WriteFile("screen.png", buffer.Bytes(), 0666) matrix := GetPaymentStr(bytes.NewReader(buffer.Bytes())) + log.Debugln("已获取到二维码内容:" + matrix.GetText()) c.Push("text", "https://techxuexi.js.org/jump/techxuexi-20211023.html?"+matrix.GetText()) c.Push("text", matrix.GetText()) - qrcodeTerminal.New2(qrcodeTerminal.ConsoleColors.BrightBlack, qrcodeTerminal.ConsoleColors.BrightWhite, qrcodeTerminal.QRCodeRecoveryLevels.Low).Get(matrix.GetRawBytes()).Print() + qrcodeTerminal.New2(qrcodeTerminal.ConsoleColors.BrightBlack, qrcodeTerminal.ConsoleColors.BrightWhite, qrcodeTerminal.QRCodeRecoveryLevels.Low).Get(matrix.GetText()).Print() _, err = page.WaitForNavigation(playwright.PageWaitForNavigationOptions{ Timeout: playwright.Float(30 * 1000 * 5), URL: nil,