Commit 3fc1fcb9d448bb51dd433671c310e28443e0ccef
1 parent
cf58f34a
Exists in
master
提交
Showing
3 changed files
with
9 additions
and
5 deletions
Show diff stats
src/HttpServer/logic/datadef.go
... | ... | @@ -78,11 +78,12 @@ type UserLoginReq struct { |
78 | 78 | } |
79 | 79 | |
80 | 80 | type UserLoginData struct { |
81 | - UserId string `json:"userId"` | |
82 | - AccessToken string `json:"accessToken"` | |
83 | - LoginType int `json:"loginType"` | |
84 | - Nickname string `json:"nickname"` | |
85 | - HeadImg string `json:"headImg"` | |
81 | + UserId string `json:"userId"` | |
82 | + AccessToken string `json:"accessToken"` | |
83 | + LoginType int `json:"loginType"` | |
84 | + Nickname string `json:"nickname"` | |
85 | + HeadImg string `json:"headImg"` | |
86 | + Hitcatleftcnt int `json:"hitcatleftcnt"` | |
86 | 87 | } |
87 | 88 | |
88 | 89 | type UserLoginResp struct { | ... | ... |
src/HttpServer/logic/function.go
... | ... | @@ -725,6 +725,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int) { |
725 | 725 | resp.Data.AccessToken = "" |
726 | 726 | resp.Data.HeadImg = udata.Head |
727 | 727 | resp.Data.LoginType = data.Lype |
728 | + resp.Data.Hitcatleftcnt = udata.HitCatTime | |
728 | 729 | |
729 | 730 | //保存redis |
730 | 731 | SaveUserInfo(udata, strconv.Itoa(uuid)) | ... | ... |
src/HttpServer/logic/logic.go
... | ... | @@ -450,6 +450,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int, token string) { |
450 | 450 | resp.Data.AccessToken = token |
451 | 451 | resp.Data.HeadImg = uinfo.Head |
452 | 452 | resp.Data.LoginType = rdata.Lype |
453 | + resp.Data.Hitcatleftcnt = uinfo.HitCatTime | |
453 | 454 | uinfo.LastLoginTime = int(time.Now().Unix()) |
454 | 455 | |
455 | 456 | err = SaveUserInfo(uinfo, strconv.Itoa(uuid)) |
... | ... | @@ -1502,6 +1503,7 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { |
1502 | 1503 | //resp.Data.TimingReward = false |
1503 | 1504 | resp.Data.TimingRewardTimes = uinfo.LeftTimingRewardTimes |
1504 | 1505 | resp.Data.Shakeleftcnt = uinfo.ShakeTime |
1506 | + resp.Data.Hitcatleftcnt = uinfo.HitCatTime | |
1505 | 1507 | |
1506 | 1508 | //保存此次计算时间 |
1507 | 1509 | nowtimestr := strconv.FormatInt(nowtime, 10) | ... | ... |