diff --git a/.gitignore b/.gitignore index f00124b6..628bb972 100644 --- a/.gitignore +++ b/.gitignore @@ -48,5 +48,4 @@ /dsSzxy/.idea/ /dsSzxy/build/ /dsSzxy/WinBuild/ - *.log \ No newline at end of file diff --git a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go index 5a3b0736..23f420a4 100644 --- a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go +++ b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go @@ -505,21 +505,23 @@ func logout(context *gin.Context) { //获取所有接入系统的 list, _ := ServiceJoinApp.GetAppBaseList(1, Const.Int32Max, "") for i := range list { - //每个系统的退出地址 - logoutUri := list[i]["logout_uri"].(string) - //如果注册了退出地址的话 - if len(logoutUri) > 0 { - //开启协程进行调用 - go func() { - resp, err := http.Get(logoutUri + "?access_token=" + accessToken) - if err != nil { - fmt.Println(err) - return - } - defer resp.Body.Close() - body, _ := ioutil.ReadAll(resp.Body) - fmt.Println(string(body)) - }() + if list[i]["logout_uri"] != nil { + //每个系统的退出地址 + logoutUri := list[i]["logout_uri"].(string) + //如果注册了退出地址的话 + if len(logoutUri) > 0 { + //开启协程进行调用 + go func() { + resp, err := http.Get(logoutUri + "?access_token=" + accessToken) + if err != nil { + fmt.Println(err) + return + } + defer resp.Body.Close() + body, _ := ioutil.ReadAll(resp.Body) + fmt.Println(string(body)) + }() + } } } //清除cookie diff --git a/dsSzxy/.idea/workspace.xml b/dsSzxy/.idea/workspace.xml index 919bac7b..c8f48722 100644 --- a/dsSzxy/.idea/workspace.xml +++ b/dsSzxy/.idea/workspace.xml @@ -1,81 +1,54 @@ + + - - + + - - - - - - - + - - - - + + - - + + - - - - - - - - - + - + - - - - - - - - - - @@ -83,24 +56,7 @@ - - - true - - - - - \ No newline at end of file