This commit is contained in:
aozhiwei 2022-04-02 16:37:34 +08:00
parent bbefbf1303
commit 2e7ce88882
2 changed files with 8 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class MarketController extends BaseController {
return;
}
$countdown = max(0, $currBatchMeta['start_time'] - myself()->_getNowTime());
$countdown = mt\MarketBatch::getCountdown($currBatchMeta);
$soldNum = min(BoxOrder::getSoldNum($currBatchMeta['id']), $currBatchMeta['number_of_props']);
$totalNum = $currBatchMeta['number_of_props'];
$buyed = MarketService::isTestMode() ? 0 : BoxOrder::isBuyed($account, $currBatchMeta['id']);
@ -87,7 +87,7 @@ class MarketController extends BaseController {
//'buyed' => $buyed
);
if ($this->isTestMode()) {
if (MarketService::isTestMode()) {
foreach(array_keys($presaleInfo) as $key) {
if (!is_null(getReqVal($key, null))) {
$presaleInfo[$key] = getReqVal($key, $presaleInfo[$key]);

View File

@ -34,6 +34,12 @@ class MarketBatch {
return $currentMeta;
}
public static function getCountdown($meta)
{
$countdown = max(0, $currBatchMeta['start_time'] - myself()->_getNowTime());
return $countdown;
}
protected static function getMetaList()
{
if (!self::$metaList) {