diff --git a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go index 9e9b71e5..495a9b88 100644 --- a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go +++ b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go @@ -214,7 +214,7 @@ func accessToken(context *gin.Context) { RedisStorage.OsinServer.FinishAccessRequest(resp, req, ar) } //2020-08-04 - if resp.Output["access_token"]==nil{ + if resp.Output["access_token"] == nil { context.JSON(http.StatusOK, Model.Res{ Code: http.StatusNotImplemented, Msg: "输入的授权码与其它相应的信息不匹配!", @@ -529,7 +529,7 @@ func wxLogin(context *gin.Context) { if resp.StatusCode == 200 { //将返回结果转为json openid := gjson.Get(string(body), "openid") - context.JSON(http.StatusOK, map[string]interface{}{"success": true, "openid": openid}) + context.Redirect(301, "/sso/static/bindUser.html?openid="+openid.Str) } else { context.JSON(http.StatusOK, map[string]interface{}{"success": false, "openid": ""}) }