1
This commit is contained in:
parent
9bd28deb0c
commit
6b0360c618
@ -56,14 +56,26 @@ class MarketController extends BaseController {
|
||||
|
||||
$countdown = max(0, $currBatchMeta['start_time'] - myself()->_getNowTime());
|
||||
$soldNum = min(BoxOrder::getSoldNum($currBatchMeta['id']), $currBatchMeta['number_of_props']);
|
||||
$totalNum = $currBatchMeta['number_of_props'];
|
||||
$buyed = $this->isTestMode() ? 0 : BoxOrder::isBuyed($account, $currBatchMeta['id']);
|
||||
$title = '';
|
||||
$state = 0;
|
||||
$state = PRESALE_PREPARE;
|
||||
if ($countdown > 0) {
|
||||
$state = PRESALE_PREPARE;
|
||||
} else {
|
||||
if ($soldNum >= $totalNum) {
|
||||
$title = $this->escapeString($currBatchMeta['end_title']);
|
||||
$state = PRESALE_SOLD_OUT;
|
||||
} else {
|
||||
$title = $this->escapeString($currBatchMeta['begin_title']);
|
||||
$state = PRESALE_STARTED;
|
||||
}
|
||||
}
|
||||
$presaleInfo = array(
|
||||
'batch_id' => $currBatchMeta['batch_id'],
|
||||
'countdown' => $countdown,
|
||||
'sold_num' => $soldNum,
|
||||
'total_num' => $currBatchMeta['number_of_props'],
|
||||
'total_num' => $totalNum,
|
||||
'state' => $state,
|
||||
'title' => $title,
|
||||
'hint' => $this->escapeString($currBatchMeta['hint']),
|
||||
|
Loading…
x
Reference in New Issue
Block a user