diff --git a/dsSupport/Config/Config.ini b/dsSupport/Config/Config.ini index 4354c86a..de8d9cee 100644 --- a/dsSupport/Config/Config.ini +++ b/dsSupport/Config/Config.ini @@ -33,10 +33,10 @@ expireTime = 86400 port = 8005 [elasticsearch] -nodes = http://10.10.14.188:9200 +;nodes = http://10.10.14.188:9200 ##nodes = http://10.10.14.61:9200,http://10.10.14.62:9200,http://10.10.14.63:9200 ##nodes = http://192.168.0.200:9200,http://192.168.0.200:9201,http://192.168.0.200:9202 -;nodes = http://10.10.14.61:9200,http://10.10.14.62:9200,http://10.10.14.63:9200 +nodes = http://10.10.14.61:9200,http://10.10.14.62:9200,http://10.10.14.63:9200 ;http://10.10.14.188:9200, ;nodes = http://192.168.0.200:9200,http://192.168.0.200:9201,http://192.168.0.200:9202 user = root diff --git a/dsSupport/MyModel/Account/AccountOpenAPI/AccountOpenAPI.go b/dsSupport/MyModel/Account/AccountOpenAPI/AccountOpenAPI.go index 8b05e870..1b6a1dc7 100644 --- a/dsSupport/MyModel/Account/AccountOpenAPI/AccountOpenAPI.go +++ b/dsSupport/MyModel/Account/AccountOpenAPI/AccountOpenAPI.go @@ -112,6 +112,8 @@ func Login(c *gin.Context) { return } + + // 当前登陆者信息 godoc // @Summary 当前登陆者信息 // @Tags account @@ -247,6 +249,11 @@ func IsLogin(c *gin.Context) { sess := globalSessions.SessionStart(w, r) val := sess.Get("username") if val != nil { + s, _, accessToken := AccountService.CreateAccessToken("TEST_009", time.Now().Format("200601021504")) + if s == true { + c.SetCookie("access_token", accessToken, 3600 * 8, "/", "", false, true) + } + c.JSON(http.StatusOK, gin.H{ "status" : true, "message" : "已登陆",