diff --git a/doc/_common.py b/doc/_common.py index fdc59231..9f3b9222 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -85,6 +85,7 @@ class Gun(object): ['try_count', 0, '剩余体验次数 当state=1时才有意义'], ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], + ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], ['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'], ] @@ -216,6 +217,7 @@ class Hero(object): ['!attr', [Attr()], '属性'], ['try_count', 0, '剩余体验次数 当state=1时才有意义'], ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'], + ['unlock_lefttime', 0, '解锁剩余时间(单位秒)'], ['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'], ['today_get_gold', 0, '今天pvp获取的ceg数量'], ['last_pve_get_ceg_time', 0, '最后一次获取pve获取ceg时间'], diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index 20e48fd4..39684e03 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -173,6 +173,8 @@ class Gun extends BaseModel { 'last_pve_get_ceg_time' => $lastPveGetCegTime, 'lock_type' => $lockType, 'unlock_time' => $unlockTime, + 'unlock_lefttime' => max(0, + $unlockTime - myself()->_getNowDaySeconds()), 'unlock_trade_time' => $row['unlock_trade_time'], ); $dto['ceg_uplimit'] = FormulaService::getWeaponPvpDailyCegUpLimit($dto); diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index 1e1d2366..56e4c1a5 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -161,11 +161,13 @@ class Hero extends BaseModel { 'attr' => $attr, 'try_count' => $row['try_count'], 'lock_type' => $lockType, + 'unlock_time' => $unlockTime, + 'unlock_lefttime' => max(0, + $unlockTime - myself()->_getNowDaySeconds()), 'today_get_gold' => $todayGetGold, 'last_get_gold_time' => $lastGetGoldTime, 'today_pve_get_ceg' => $todayPveGetCeg, 'last_pve_get_gold_ceg' => $lastPveGetCegTime, - 'unlock_time' => $unlockTime, 'unlock_trade_time' => $row['unlock_trade_time'], ); $dto['ceg_uplimit'] = FormulaService::getHeroPvpDailyCegUpLimit($dto);