瀏覽代碼

主页签到倒计时

提现调整
adv_callback
huangjiajun 2 週之前
父節點
當前提交
e8e88df65d
共有 3 個檔案被更改,包括 6 行新增4 行删除
  1. +3
    -1
      app/hdl/hdl_home_page.go
  2. +1
    -0
      app/md/md_home_page.go
  3. +2
    -3
      go.mod

+ 3
- 1
app/hdl/hdl_home_page.go 查看文件

@@ -79,7 +79,7 @@ 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,6 +96,7 @@ 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 查询个人及团队蛋蛋能量
@@ -166,6 +167,7 @@ func HomePage(c *gin.Context) {
}))

resp := md.HomePageResp{
LeaveTimer: LeaveTimer,
IsSign: isSign,
SignEndTime: signCountdown,
TotalEggEnergy: utils.Float64ToStr(totalEggEnergy),


+ 1
- 0
app/md/md_home_page.go 查看文件

@@ -9,6 +9,7 @@ type HomePageResp struct {
NowBasalRate string `json:"now_basal_rate"` // 当前基础速率/小时
NowTeamRate string `json:"now_team_rate"` // 当前团队速率/小时
NickName string `json:"nick_name"` // 用户名称
LeaveTimer string `json:"leave_timer"` //可签到剩余时间 秒
}

type HomePageWatchAdRuleResp struct {


+ 2
- 3
go.mod 查看文件

@@ -15,7 +15,7 @@ require (
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.20.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/gomodule/redigo v2.0.0+incompatible
github.com/gomodule/redigo v1.9.2
github.com/jinzhu/copier v0.4.0
github.com/makiuchi-d/gozxing v0.0.0-20210324052758-57132e828831
github.com/qiniu/api.v7/v7 v7.8.2
@@ -33,11 +33,10 @@ require (

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241204095350-c895baf67bc5
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241204095556-04ee23549ee5
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241204100652-09a6749b5f44
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/gin-contrib/sessions v1.0.1
github.com/go-pay/crypto v0.0.1
github.com/go-pay/gopay v1.5.101
github.com/go-pay/xlog v0.0.2


Loading…
取消
儲存