diff --git a/src/HttpServer/logic/datadef.go b/src/HttpServer/logic/datadef.go index fb615e9..8933213 100644 --- a/src/HttpServer/logic/datadef.go +++ b/src/HttpServer/logic/datadef.go @@ -574,6 +574,7 @@ type GetMainPageInfoData struct { AdRate adRateData `json:"adRate"` Level int `json:"level"` TotalCashReward float32 `json:"totalCashReward"` + Guide bool `json:"guide"` } type GetMainPageInfoResp struct { @@ -755,6 +756,7 @@ type UserData struct { FlopCardCnt int //翻牌次数计数 FlopCardLefCnt int //剩余翻拍次数 TodayZhaocai float32 //当天招财猫收益 + IsNew int //是否需要引导 CatShopInfo CatShopData //猫咖门店数据 Taskinfo TaskData //任务数据 AchieveMent AchieveMentData //成就数据 diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 0c31146..45cab1e 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -111,6 +111,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int, token string) { } else { uinfo, err := GetUserInfo(strconv.Itoa(rdata.UserId)) + uinfo.IsNew = 1 if err != nil { logger.Info("GetUserInfo HandlerLogin data failed:%v,for:%v", err, data) resp.Message = "GetUserInfo failed" @@ -574,7 +575,11 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { } resp.Data.Level = len(uinfo.BuyCatInfo) - resp.Data.totalCashReward = uinfo.TodayZhaocai + resp.Data.TotalCashReward = uinfo.TodayZhaocai + resp.Data.Guide = false + if uinfo.IsNew == 0 { + resp.Data.Guide = true + } resp.Code = 0 break } -- libgit2 0.21.0