Browse Source

update

adv_callback
shenjiachi 2 weeks ago
parent
commit
f567cc476c
2 changed files with 6 additions and 1 deletions
  1. +5
    -1
      app/hdl/hdl_home_page.go
  2. +1
    -0
      app/md/md_home_page.go

+ 5
- 1
app/hdl/hdl_home_page.go View File

@@ -231,7 +231,10 @@ func HomePageWatchAdRule(c *gin.Context) {
}
}
nextWatchAdDate, _ := cache.GetString(redisKey)
var nextWatchAdTimes = utils.TimeParseStd(nextWatchAdDate).Unix() - time.Now().Unix()
nextWatchAdTimes := utils.TimeParseStd(nextWatchAdDate).Unix() - time.Now().Unix()
if nextWatchAdTimes < 0 {
nextWatchAdTimes = 0
}

utils.FilePutContents("nextWatchAdDate", utils.SerializeStr(map[string]interface{}{
"nextWatchAdDate": nextWatchAdDate,
@@ -245,6 +248,7 @@ func HomePageWatchAdRule(c *gin.Context) {
ResidueWatchAdNum: residueWatchAdNum,
WatchAdRewardActivePoints: videoRewardSystem.RewardValue,
NextWatchAdDate: nextWatchAdDate,
NextWatchAdSecs: nextWatchAdTimes,
EachRoundHour: videoRewardSystem.EachRoundHour,
}
e.OutSuc(c, resp, nil)


+ 1
- 0
app/md/md_home_page.go View File

@@ -16,6 +16,7 @@ type HomePageWatchAdRuleResp struct {
ResidueWatchAdNum int `json:"residue_watch_ad_num"` // 当前剩余可观看视频数
WatchAdRewardActivePoints string `json:"watch_ad_reward_active_points"` // 观看广告视频奖励X个活跃积分
NextWatchAdDate string `json:"next_watch_ad_date"` // 下次可观看广告时间,若为空允许观看视频
NextWatchAdSecs int64 `json:"next_watch_ad_secs"` // 下次可观看广告时间,若为空允许观看视频
EachRoundHour string `json:"each_round_hour"` // 每一轮X个小时
}



Loading…
Cancel
Save