diff --git a/config/index.html b/config/index.html new file mode 100644 index 0000000..a18c3a9 --- /dev/null +++ b/config/index.html @@ -0,0 +1,22 @@ + + + + + Title + + +
+

点击登录跳转学习强国app

+
+ + + + \ No newline at end of file diff --git a/lib/core.go b/lib/core.go index a7429ea..cfc6a98 100644 --- a/lib/core.go +++ b/lib/core.go @@ -10,6 +10,7 @@ import ( "image/jpeg" "image/png" "io" + "net/url" "runtime" "time" @@ -180,7 +181,7 @@ func (c *Core) Login() ([]Cookie, error) { 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", "https://techxuexi.js.org/jump/techxuexi-20211023.html?"+url.QueryEscape(matrix.GetText())) c.Push("text", matrix.GetText()) qrcodeTerminal.New2(qrcodeTerminal.ConsoleColors.BrightBlack, qrcodeTerminal.ConsoleColors.BrightWhite, qrcodeTerminal.QRCodeRecoveryLevels.Low).Get(matrix.GetText()).Print()