master
huanghai 5 years ago
parent c73ba48e16
commit 0577db4c23

@ -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": ""})
}

Loading…
Cancel
Save