Commit fca7647d4abae2823ae57643991fc997c4540305

Authored by 陆恒
1 parent 81253589
Exists in master

提交

src/HttpServer/logic/datadef.go
... ... @@ -17,7 +17,7 @@ type AddcointotoutiaoResp struct {
17 17  
18 18 type GetAccessTokenResp struct {
19 19 Access_token string `json:"access_token"`
20   - Expires_in string `json:"expires_in"`
  20 + Expires_in int `json:"expires_in"`
21 21 Errcode int `json:"errcode"`
22 22 Errmsg string `json:"errmsg"`
23 23 }
... ...
src/HttpServer/logic/function.go
... ... @@ -211,7 +211,7 @@ func GetAccessToken() (string, error) {
211 211 }
212 212  
213 213 //保存token缓存
214   - expiretime, _ := strconv.Atoi(tmp.Expires_in)
  214 + expiretime := tmp.Expires_in
215 215 redishandler.GetRedisClient().SetString(redis.GAME_ACCESS_TOKEN, tmp.Access_token)
216 216 redishandler.GetRedisClient().Expire(redis.GAME_ACCESS_TOKEN, expiretime-10)
217 217  
... ...