diff --git a/app/hdl/hdl_home_page.go b/app/hdl/hdl_home_page.go index 8fe8fda..9e0089a 100644 --- a/app/hdl/hdl_home_page.go +++ b/app/hdl/hdl_home_page.go @@ -79,7 +79,6 @@ func HomePage(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return } - LeaveTimer := "0" if has && utils.TimeParseStd(signIn.EndTime).After(now) { //3.2.1 获取预估每秒获得蛋蛋能量数 estimatePerSecondPersonEggEnergyValue, err1 := decimal.NewFromString(signIn.EstimatePerSecondPersonEggEnergyValue) @@ -96,7 +95,6 @@ func HomePage(c *gin.Context) { signTeamEggEnergy = estimatePerSecondTeamEggEnergyValue.String() isSign = true signCountdown = signIn.EndTime - LeaveTimer = utils.Int64ToStr(utils.TimeStdParseUnix(signIn.EndTime) - time.Now().Unix()) } // 3.3 查询个人及团队蛋蛋能量 @@ -167,7 +165,7 @@ func HomePage(c *gin.Context) { })) resp := md.HomePageResp{ - LeaveTimer: LeaveTimer, + LeaveTimer: utils.Int64ToStr(residueTimes), IsSign: isSign, SignEndTime: signCountdown, TotalEggEnergy: utils.Float64ToStr(totalEggEnergy), diff --git a/app/router/router.go b/app/router/router.go index 6376282..da1bcd5 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -98,7 +98,7 @@ func route(r *gin.RouterGroup) { rHomePage.GET("/index", hdl.HomePage) // 主页 rHomePage.GET("/adRule", hdl.HomePageWatchAdRule) // 主页-可以观看广告规则 rHomePage.GET("/realTimePrice", hdl.RealTimePrice) // 主页-实时数据 - rHomePage.GET("/isCanSignIn", hdl.IsCanSignIn) // 主页-是否可以观看广告 + rHomePage.GET("/isCanSignIn", hdl.IsCanSignIn) // 主页-是否可以签到 rHomePage.GET("/isCanGetRedPackage", hdl.IsCanGetRedPackage) // 主页-是否可以获得红包 }