1
This commit is contained in:
parent
e8aa907a89
commit
6e4d821a30
@ -7,12 +7,16 @@ require_once('mt/WhiteList.php');
|
|||||||
require_once('mt/Currency.php');
|
require_once('mt/Currency.php');
|
||||||
require_once('mt/Hero.php');
|
require_once('mt/Hero.php');
|
||||||
|
|
||||||
|
require_once('models/Box.php');
|
||||||
|
|
||||||
use phpcommon\SqlHelper;
|
use phpcommon\SqlHelper;
|
||||||
|
use models\Box;
|
||||||
|
|
||||||
class NewMarketController extends BaseController {
|
class NewMarketController extends BaseController {
|
||||||
|
|
||||||
public function searchBox()
|
public function searchBox()
|
||||||
{
|
{
|
||||||
|
$account = getReqVal('account', '');
|
||||||
$page = getReqVal('page', 1);
|
$page = getReqVal('page', 1);
|
||||||
$type = getReqVal('type', 0);
|
$type = getReqVal('type', 0);
|
||||||
$sort = getReqVal('sort', '');
|
$sort = getReqVal('sort', '');
|
||||||
@ -35,10 +39,10 @@ class NewMarketController extends BaseController {
|
|||||||
$presaleInfo = array(
|
$presaleInfo = array(
|
||||||
'batch_id' => $currBatchMeta['batch_id'],
|
'batch_id' => $currBatchMeta['batch_id'],
|
||||||
'countdown' => max(0, $currBatchMeta['_start_time_utc'] - myself()->_getNowTime()),
|
'countdown' => max(0, $currBatchMeta['_start_time_utc'] - myself()->_getNowTime()),
|
||||||
'sold_num' => 0,
|
'sold_num' => min(Box::getSoldNum($currBatchMeta['batch_id']), $currBatchMeta['number_of_props']),
|
||||||
'inventory_num' => $currBatchMeta['number_of_props'],
|
'inventory_num' => $currBatchMeta['number_of_props'],
|
||||||
'hint' => str_replace("\n", '\n', $currBatchMeta['hint']),
|
'hint' => str_replace("\n", '\n', $currBatchMeta['hint']),
|
||||||
'buyed' => rand() % 2 < 1 ? 0 : 1
|
'buyed' => Box::isBuyed($account, $currBatchMeta['batch_id'])
|
||||||
);
|
);
|
||||||
|
|
||||||
$batchMetas = mt\MarketGoods::getBatchMetas($currBatchMeta['batch_id']);
|
$batchMetas = mt\MarketGoods::getBatchMetas($currBatchMeta['batch_id']);
|
||||||
|
@ -9,7 +9,12 @@ class Box extends BaseModel {
|
|||||||
|
|
||||||
public function getSoldNum($batchId)
|
public function getSoldNum($batchId)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isBuyed($buyerAddress, $batchId)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user