This commit is contained in:
aozhiwei 2022-01-29 15:43:44 +08:00
commit eaf341c031

View File

@ -29,13 +29,14 @@ class MarketController extends BaseController {
public function getPreSaleInfo()
{
$account = getReqVal('account', '');
$currBatchMeta = mt\MarketBatch::getCurrentBatch();
if (!$currBatchMeta) {
myself()->_rspErr(500, 'server internal error');
return;
}
$countdown = max(0, $currBatchMeta['_start_time_utc'] - myself()->_getNowTime());
$countdown = max(0, $currBatchMeta['start_time'] - myself()->_getNowTime());
$soldNum = min(BoxOrder::getSoldNum($currBatchMeta['id']), $currBatchMeta['number_of_props']);
$buyed = $this->isTestMode() ? 0 : BoxOrder::isBuyed($account, $currBatchMeta['id']);
$presaleInfo = array(