Commit 7959f63ca1fb5c953b4d77d815d7e0ce55654b88
1 parent
fd195989
Exists in
master
提交
Showing
2 changed files
with
8 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/datadef.go
| @@ -574,6 +574,7 @@ type GetMainPageInfoData struct { | @@ -574,6 +574,7 @@ type GetMainPageInfoData struct { | ||
| 574 | AdRate adRateData `json:"adRate"` | 574 | AdRate adRateData `json:"adRate"` |
| 575 | Level int `json:"level"` | 575 | Level int `json:"level"` |
| 576 | TotalCashReward float32 `json:"totalCashReward"` | 576 | TotalCashReward float32 `json:"totalCashReward"` |
| 577 | + Guide bool `json:"guide"` | ||
| 577 | } | 578 | } |
| 578 | 579 | ||
| 579 | type GetMainPageInfoResp struct { | 580 | type GetMainPageInfoResp struct { |
| @@ -755,6 +756,7 @@ type UserData struct { | @@ -755,6 +756,7 @@ type UserData struct { | ||
| 755 | FlopCardCnt int //翻牌次数计数 | 756 | FlopCardCnt int //翻牌次数计数 |
| 756 | FlopCardLefCnt int //剩余翻拍次数 | 757 | FlopCardLefCnt int //剩余翻拍次数 |
| 757 | TodayZhaocai float32 //当天招财猫收益 | 758 | TodayZhaocai float32 //当天招财猫收益 |
| 759 | + IsNew int //是否需要引导 | ||
| 758 | CatShopInfo CatShopData //猫咖门店数据 | 760 | CatShopInfo CatShopData //猫咖门店数据 |
| 759 | Taskinfo TaskData //任务数据 | 761 | Taskinfo TaskData //任务数据 |
| 760 | AchieveMent AchieveMentData //成就数据 | 762 | AchieveMent AchieveMentData //成就数据 |
src/HttpServer/logic/logic.go
| @@ -111,6 +111,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int, token string) { | @@ -111,6 +111,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int, token string) { | ||
| 111 | 111 | ||
| 112 | } else { | 112 | } else { |
| 113 | uinfo, err := GetUserInfo(strconv.Itoa(rdata.UserId)) | 113 | uinfo, err := GetUserInfo(strconv.Itoa(rdata.UserId)) |
| 114 | + uinfo.IsNew = 1 | ||
| 114 | if err != nil { | 115 | if err != nil { |
| 115 | logger.Info("GetUserInfo HandlerLogin data failed:%v,for:%v", err, data) | 116 | logger.Info("GetUserInfo HandlerLogin data failed:%v,for:%v", err, data) |
| 116 | resp.Message = "GetUserInfo failed" | 117 | resp.Message = "GetUserInfo failed" |
| @@ -574,7 +575,11 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { | @@ -574,7 +575,11 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { | ||
| 574 | } | 575 | } |
| 575 | 576 | ||
| 576 | resp.Data.Level = len(uinfo.BuyCatInfo) | 577 | resp.Data.Level = len(uinfo.BuyCatInfo) |
| 577 | - resp.Data.totalCashReward = uinfo.TodayZhaocai | 578 | + resp.Data.TotalCashReward = uinfo.TodayZhaocai |
| 579 | + resp.Data.Guide = false | ||
| 580 | + if uinfo.IsNew == 0 { | ||
| 581 | + resp.Data.Guide = true | ||
| 582 | + } | ||
| 578 | resp.Code = 0 | 583 | resp.Code = 0 |
| 579 | break | 584 | break |
| 580 | } | 585 | } |