改成内网验证token

This commit is contained in:
2024-04-19 15:09:44 +08:00
parent 03142cf8f3
commit 4f73a4d042
2 changed files with 4 additions and 16 deletions
+2 -2
View File
@@ -166,7 +166,7 @@ func (l LoginApi) GetToken(c *gin.Context) {
data.Set("loginid", param.Username)
// 创建 HTTP 请求
req, err := http.NewRequest("POST", "https://oa.zwgczx.com/ssologin/getToken", strings.NewReader(data.Encode()))
req, err := http.NewRequest("POST", "http://192.168.2.221:8088/ssologin/getToken", strings.NewReader(data.Encode()))
if err != nil {
panic(err)
}
@@ -188,7 +188,7 @@ func (l LoginApi) GetToken(c *gin.Context) {
}
if strings.Contains(string(body), "Token获取失败") {
fmt.Println("请求失败: Token获取失败")
fmt.Println(string(body))
apiReturn.ErrorNoAccess(c)
panic("请求失败: Token获取失败")