master
huanghai 5 years ago
parent 0383015509
commit 676444fdfb

@ -227,7 +227,6 @@ func accessToken(context *gin.Context) {
refreshToken := resp.Output["refresh_token"].(string) refreshToken := resp.Output["refresh_token"].(string)
tokenType := resp.Output["token_type"].(string) tokenType := resp.Output["token_type"].(string)
identityIdInt, _ := strconv.Atoi(identityId) identityIdInt, _ := strconv.Atoi(identityId)
//personIdInt, _ := strconv.Atoi(personId)
//记录refresh_token与identity_id,person_id关系 //记录refresh_token与identity_id,person_id关系
personStr := "{\"identity_id\":\"" + identityId + "\",\"person_id\":\"" + personId + "\",\"device_id\":\"" + deviceId + "\"}" personStr := "{\"identity_id\":\"" + identityId + "\",\"person_id\":\"" + personId + "\",\"device_id\":\"" + deviceId + "\"}"
k := ConfigUtil.OAuth2RedisKeyPrefix + ":refresh_token_vs_person:" + refreshToken k := ConfigUtil.OAuth2RedisKeyPrefix + ":refresh_token_vs_person:" + refreshToken
@ -507,9 +506,9 @@ func resetRemainCount(context *gin.Context) {
// @Tags 登录验证类 // @Tags 登录验证类
// @Accept application/x-www-form-urlencoded // @Accept application/x-www-form-urlencoded
// @Produce json // @Produce json
// @Param code query string true "腾讯返回的code码" // @Param code formData string true "腾讯返回的code码"
// @Success 200 {string} string // @Success 200 {string} string
// @Router /oauth2/wxLogin [get] // @Router /oauth2/wxLogin [post]
// @X-EmptyLimit ["code"] // @X-EmptyLimit ["code"]
func wxLogin(context *gin.Context) { func wxLogin(context *gin.Context) {
var code = context.PostForm("code") var code = context.PostForm("code")

@ -328,7 +328,7 @@ var doc = `{
} }
}, },
"/oauth2/wxLogin": { "/oauth2/wxLogin": {
"get": { "post": {
"description": "微信登录", "description": "微信登录",
"consumes": [ "consumes": [
"application/x-www-form-urlencoded" "application/x-www-form-urlencoded"
@ -345,7 +345,7 @@ var doc = `{
"type": "string", "type": "string",
"description": "腾讯返回的code码", "description": "腾讯返回的code码",
"name": "code", "name": "code",
"in": "query", "in": "formData",
"required": true "required": true
} }
], ],

@ -312,7 +312,7 @@
} }
}, },
"/oauth2/wxLogin": { "/oauth2/wxLogin": {
"get": { "post": {
"description": "微信登录", "description": "微信登录",
"consumes": [ "consumes": [
"application/x-www-form-urlencoded" "application/x-www-form-urlencoded"
@ -329,7 +329,7 @@
"type": "string", "type": "string",
"description": "腾讯返回的code码", "description": "腾讯返回的code码",
"name": "code", "name": "code",
"in": "query", "in": "formData",
"required": true "required": true
} }
], ],

@ -243,13 +243,13 @@ paths:
x-emptylimit: x-emptylimit:
- userName - userName
/oauth2/wxLogin: /oauth2/wxLogin:
get: post:
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 微信登录 description: 微信登录
parameters: parameters:
- description: 腾讯返回的code码 - description: 腾讯返回的code码
in: query in: formData
name: code name: code
required: true required: true
type: string type: string

Loading…
Cancel
Save