From 6973a10b4bc4ec51792946a1872bc38f557c54bb Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Wed, 2 Dec 2020 19:29:31 +0800 Subject: [PATCH] fix #455. --- server/apiAdmin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/apiAdmin.go b/server/apiAdmin.go index ddef632..971d515 100644 --- a/server/apiAdmin.go +++ b/server/apiAdmin.go @@ -132,7 +132,7 @@ func (s *webServer) Dologin() { _ = ioutil.WriteFile("captcha.jpg", rsp.CaptchaImage, 0644) img, _, _ := image.Decode(bytes.NewReader(rsp.CaptchaImage)) fmt.Println(asciiart.New("image", img).Art) - if conf.WebUi.WebInput { + if conf.WebUi != nil && conf.WebUi.WebInput { log.Warnf("请输入验证码 (captcha.jpg): (http://%s:%d/admin/do_web_write 输入)", conf.WebUi.Host, conf.WebUi.WebUiPort) text = <-WebInput } else { @@ -178,7 +178,7 @@ func (s *webServer) Dologin() { return case client.UnsafeDeviceError: log.Warnf("账号已开启设备锁,请前往 -> %v <- 验证并重启Bot.", rsp.VerifyUrl) - if conf.WebUi.WebInput { + if conf.WebUi != nil && conf.WebUi.WebInput { log.Infof(" (http://%s:%d/admin/do_web_write 确认后继续)....", conf.WebUi.Host, conf.WebUi.WebUiPort) text = <-WebInput } else {