|
|
@@ -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) |
|
|
|