Commit 7959f63ca1fb5c953b4d77d815d7e0ce55654b88

Authored by 陆恒
1 parent fd195989
Exists in master

提交

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