Selaa lähdekoodia

update

adv_callback
shenjiachi 2 viikkoa sitten
vanhempi
commit
f567cc476c
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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个小时
}



Ladataan…
Peruuta
Tallenna