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,11 +78,12 @@ type UserLoginReq struct { | ||
78 | } | 78 | } |
79 | 79 | ||
80 | type UserLoginData struct { | 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 | type UserLoginResp struct { | 89 | type UserLoginResp struct { |
src/HttpServer/logic/function.go
@@ -725,6 +725,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int) { | @@ -725,6 +725,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int) { | ||
725 | resp.Data.AccessToken = "" | 725 | resp.Data.AccessToken = "" |
726 | resp.Data.HeadImg = udata.Head | 726 | resp.Data.HeadImg = udata.Head |
727 | resp.Data.LoginType = data.Lype | 727 | resp.Data.LoginType = data.Lype |
728 | + resp.Data.Hitcatleftcnt = udata.HitCatTime | ||
728 | 729 | ||
729 | //保存redis | 730 | //保存redis |
730 | SaveUserInfo(udata, strconv.Itoa(uuid)) | 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,6 +450,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int, token string) { | ||
450 | resp.Data.AccessToken = token | 450 | resp.Data.AccessToken = token |
451 | resp.Data.HeadImg = uinfo.Head | 451 | resp.Data.HeadImg = uinfo.Head |
452 | resp.Data.LoginType = rdata.Lype | 452 | resp.Data.LoginType = rdata.Lype |
453 | + resp.Data.Hitcatleftcnt = uinfo.HitCatTime | ||
453 | uinfo.LastLoginTime = int(time.Now().Unix()) | 454 | uinfo.LastLoginTime = int(time.Now().Unix()) |
454 | 455 | ||
455 | err = SaveUserInfo(uinfo, strconv.Itoa(uuid)) | 456 | err = SaveUserInfo(uinfo, strconv.Itoa(uuid)) |
@@ -1502,6 +1503,7 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { | @@ -1502,6 +1503,7 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { | ||
1502 | //resp.Data.TimingReward = false | 1503 | //resp.Data.TimingReward = false |
1503 | resp.Data.TimingRewardTimes = uinfo.LeftTimingRewardTimes | 1504 | resp.Data.TimingRewardTimes = uinfo.LeftTimingRewardTimes |
1504 | resp.Data.Shakeleftcnt = uinfo.ShakeTime | 1505 | resp.Data.Shakeleftcnt = uinfo.ShakeTime |
1506 | + resp.Data.Hitcatleftcnt = uinfo.HitCatTime | ||
1505 | 1507 | ||
1506 | //保存此次计算时间 | 1508 | //保存此次计算时间 |
1507 | nowtimestr := strconv.FormatInt(nowtime, 10) | 1509 | nowtimestr := strconv.FormatInt(nowtime, 10) |