Commit 51910dcb7c5decb528e0f2d30059e2c13c4746ea

Authored by 陆恒
1 parent b4dc3123
Exists in master

提交

src/HttpServer/logic/datadef.go
@@ -44,11 +44,12 @@ type offlineRewardDesc struct { @@ -44,11 +44,12 @@ type offlineRewardDesc struct {
44 } 44 }
45 45
46 type GetUserDataData struct { 46 type GetUserDataData struct {
47 - TimingReward bool `json:"timingReward"`  
48 - OfflineReward offlineRewardDesc `json:"offlineReward"`  
49 - Output string `json:"output"`  
50 - Coin string `json:"coin"`  
51 - Now int `json:"now"` 47 + TimingReward bool `json:"timingReward"`
  48 + OfflineReward offlineRewardDesc `json:"offlineReward"`
  49 + Output string `json:"output"`
  50 + Coin string `json:"coin"`
  51 + Now int `json:"now"`
  52 + TimingRewardTimes int `json:"timingRewardTimes"`
52 } 53 }
53 54
54 type GetUserDataResp struct { 55 type GetUserDataResp struct {
@@ -567,12 +568,12 @@ type adRateData struct { @@ -567,12 +568,12 @@ type adRateData struct {
567 } 568 }
568 569
569 type GetMainPageInfoData struct { 570 type GetMainPageInfoData struct {
570 - LimitCatList []int `json:"limitCatList"`  
571 - CatList []CatPosInfo `json:"catList"`  
572 - Coin DoBuyCatCoin `json:"coin"`  
573 - AdRate adRateData `json:"adRate"`  
574 - Level int `json:"level"`  
575 - TimingRewardTimes int `json:"timingRewardTimes"` 571 + LimitCatList []int `json:"limitCatList"`
  572 + CatList []CatPosInfo `json:"catList"`
  573 + Coin DoBuyCatCoin `json:"coin"`
  574 + AdRate adRateData `json:"adRate"`
  575 + Level int `json:"level"`
  576 + totalCashReward float32 `json:"totalCashReward"`
576 } 577 }
577 578
578 type GetMainPageInfoResp struct { 579 type GetMainPageInfoResp struct {
src/HttpServer/logic/logic.go
@@ -371,6 +371,8 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { @@ -371,6 +371,8 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) {
371 SaveUserInfo(uinfo, strconv.Itoa(uuid)) 371 SaveUserInfo(uinfo, strconv.Itoa(uuid))
372 } 372 }
373 373
  374 + resp.Data.TimingRewardTimes = uinfo.GetWatchAdsGoldTime
  375 +
374 //保存此次计算时间 376 //保存此次计算时间
375 nowtimestr := strconv.FormatInt(nowtime, 10) 377 nowtimestr := strconv.FormatInt(nowtime, 10)
376 redishandler.GetRedisClient().HSet(redis.USER_LAST_CALC_TIME, strconv.Itoa(uuid), nowtimestr) 378 redishandler.GetRedisClient().HSet(redis.USER_LAST_CALC_TIME, strconv.Itoa(uuid), nowtimestr)
@@ -572,7 +574,7 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { @@ -572,7 +574,7 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) {
572 } 574 }
573 575
574 resp.Data.Level = len(uinfo.BuyCatInfo) 576 resp.Data.Level = len(uinfo.BuyCatInfo)
575 - resp.Data.TimingRewardTimes = uinfo.GetWatchAdsGoldTime 577 + resp.Data.totalCashReward = uinfo.TodayZhaocai
576 resp.Code = 0 578 resp.Code = 0
577 break 579 break
578 } 580 }