1
This commit is contained in:
parent
75cfad24c3
commit
49e46637fc
@ -1375,6 +1375,7 @@ class ComputingPower(object):
|
|||||||
['listing_state', 0, 'listing状态 0:之前 1:之后'],
|
['listing_state', 0, 'listing状态 0:之前 1:之后'],
|
||||||
['owned_cec', 0, '拥有的cec数量'],
|
['owned_cec', 0, '拥有的cec数量'],
|
||||||
['owned_total_hash_rate', 0, '用户总科技值'],
|
['owned_total_hash_rate', 0, '用户总科技值'],
|
||||||
|
['owned_total_crystal', 0, '用户总晶体数'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class CrystalUI(object):
|
class CrystalUI(object):
|
||||||
|
@ -14,12 +14,14 @@ require_once('models/CrystalRecord.php');
|
|||||||
require_once('models/RewardsCec.php');
|
require_once('models/RewardsCec.php');
|
||||||
require_once('models/Staking.php');
|
require_once('models/Staking.php');
|
||||||
require_once('models/HashRateTask.php');
|
require_once('models/HashRateTask.php');
|
||||||
|
require_once('models/Bag.php');
|
||||||
|
|
||||||
use models\ComputingPower;
|
use models\ComputingPower;
|
||||||
use models\CrystalRecord;
|
use models\CrystalRecord;
|
||||||
use models\RewardsCec;
|
use models\RewardsCec;
|
||||||
use models\Staking;
|
use models\Staking;
|
||||||
use models\HashRateTask;
|
use models\HashRateTask;
|
||||||
|
use models\Bag;
|
||||||
use mt\HashRate;
|
use mt\HashRate;
|
||||||
use mt\Parameter;
|
use mt\Parameter;
|
||||||
use phpcommon\SqlHelper;
|
use phpcommon\SqlHelper;
|
||||||
@ -101,7 +103,7 @@ class ComputingPowerController extends BaseAuthedController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$crystalDb = Bag::find(ComputingPower::CRYSTAL_NEW);
|
||||||
$info = array(
|
$info = array(
|
||||||
'period_state' => $period_state,
|
'period_state' => $period_state,
|
||||||
'curr_period' => $curr_period,
|
'curr_period' => $curr_period,
|
||||||
@ -110,6 +112,7 @@ class ComputingPowerController extends BaseAuthedController
|
|||||||
'listing_state' => LISTING_SWITCH,
|
'listing_state' => LISTING_SWITCH,
|
||||||
'owned_cec' => RewardsCec::getTotalCecNum(),
|
'owned_cec' => RewardsCec::getTotalCecNum(),
|
||||||
'owned_total_hash_rate' =>ComputingPower::getMyTotalBH(),
|
'owned_total_hash_rate' =>ComputingPower::getMyTotalBH(),
|
||||||
|
'owned_total_crystal' =>$crystalDb ? $crystalDb['item_num'] : 0,
|
||||||
);
|
);
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'info' => $info
|
'info' => $info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user