master
huanghai 5 years ago
parent 505aa2acb7
commit 7b2224c9a3

@ -34,3 +34,6 @@ go build -gcflags "all=-N -l" -o ./build/dsBaseRpc main.go
//构建一个强制转换的错误~~~~ //构建一个强制转换的错误~~~~
//panic(400) //panic(400)
#golang解决中文乱码的方法
https://www.cnblogs.com/mo3408/p/12216695.html

@ -229,7 +229,7 @@ func accessToken(context *gin.Context) {
context.JSON(http.StatusOK, context.JSON(http.StatusOK,
gin.H{ gin.H{
"access_token": accessToken, "expires_in": expiresIn, "refresh_token": refreshToken, "access_token": accessToken, "expires_in": expiresIn, "refresh_token": refreshToken,
"token_type": tokenType, "identity_id": identityIdInt, "person_id": personId}) "token_type": tokenType, "identity_id": identityIdInt, "person_id": personId, "code": 200})
return return
} else { } else {
//刷新token //刷新token
@ -272,7 +272,7 @@ func accessToken(context *gin.Context) {
context.JSON(http.StatusOK, context.JSON(http.StatusOK,
gin.H{ gin.H{
"access_token": accessToken, "expires_in": expiresIn, "refresh_token": refreshToken, "access_token": accessToken, "expires_in": expiresIn, "refresh_token": refreshToken,
"token_type": tokenType, "identity_id": identityIdInt, "person_id": personIdInt}) "token_type": tokenType, "identity_id": identityIdInt, "person_id": personIdInt, "code": 200})
return return
} }
} }

@ -67,7 +67,7 @@ func startOAuth2Server() {
// @title 东师理想统一认证中心(OAuth2+Sso) // @title 东师理想统一认证中心(OAuth2+Sso)
// @version 2.0 // @version 2.0
// @description 参考自xxl-sso // @description 参考自xxl-sso
// @host 127.0.0.1:8000 // @host 10.10.14.187:8000
func main() { func main() {
// 发布模式 // 发布模式
//gin.SetMode(gin.ReleaseMode) //gin.SetMode(gin.ReleaseMode)

Loading…
Cancel
Save