From e90d58a50692d15857342a469d63ffbc94a5069c Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Tue, 16 Aug 2022 00:00:23 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=AD=A3=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E8=8B=A5=E5=B9=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- README.md | 2 +- main.go | 1 - v1/transfer/login.go | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2a48f96..7e49512 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /.idea/ /Config* -/GoBuilder.bat +/*.bat +/*.log /autoLogin* /BitSrunLoginGo* \ No newline at end of file diff --git a/README.md b/README.md index 3d77b7a..8c522f2 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ import ( func main() { //具体用法请查看struct注释 if e:=BitSrun.Login(&srunTransfer.Login{ - Https: false, + Https: false, Client: nil, LoginInfo: srunTransfer.LoginInfo{ Form: &srunTransfer.LoginForm{ diff --git a/main.go b/main.go index 5cc199b..4dba2d9 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,6 @@ func main() { //进入守护模式流程 controllers.EnterGuardian() } else { - //单次登录模式 if global.Config.Settings.Basic.Interfaces == "" { //单网卡 if err := controllers.Login(nil); err != nil { log.Fatalln("运行出错,状态异常: ", err) diff --git a/v1/transfer/login.go b/v1/transfer/login.go index c538d3d..d76cfb7 100644 --- a/v1/transfer/login.go +++ b/v1/transfer/login.go @@ -5,6 +5,7 @@ import "net/http" type LoginForm struct { Domain string `json:"domain"` UserName string `json:"username"` + //运营商类型 UserType string `json:"user_type"` PassWord string `json:"password"` } @@ -22,7 +23,7 @@ type LoginInfo struct { } type Login struct { - //调用API时直接访问https URL + //调用 API 时直接访问 https URL Https bool //登录参数,不可缺省 LoginInfo LoginInfo