diff --git a/dsBaseRpc/Linux上安装Go环境+配置DLV.txt b/dsBaseRpc/Linux上安装Go环境+配置DLV.txt index 69c73c23..dfd034ee 100644 --- a/dsBaseRpc/Linux上安装Go环境+配置DLV.txt +++ b/dsBaseRpc/Linux上安装Go环境+配置DLV.txt @@ -34,3 +34,6 @@ go build -gcflags "all=-N -l" -o ./build/dsBaseRpc main.go //构建一个强制转换的错误~~~~ //panic(400) + +#golang解决中文乱码的方法 +https://www.cnblogs.com/mo3408/p/12216695.html \ No newline at end of file diff --git a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go index 6d9444de..db992550 100644 --- a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go +++ b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go @@ -229,7 +229,7 @@ func accessToken(context *gin.Context) { context.JSON(http.StatusOK, gin.H{ "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 } else { //刷新token @@ -272,7 +272,7 @@ func accessToken(context *gin.Context) { context.JSON(http.StatusOK, gin.H{ "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 } } diff --git a/dsSso/main.go b/dsSso/main.go index 72b22ec9..2b257b82 100644 --- a/dsSso/main.go +++ b/dsSso/main.go @@ -67,7 +67,7 @@ func startOAuth2Server() { // @title 东师理想统一认证中心(OAuth2+Sso) // @version 2.0 // @description 参考自xxl-sso -// @host 127.0.0.1:8000 +// @host 10.10.14.187:8000 func main() { // 发布模式 //gin.SetMode(gin.ReleaseMode)