1
This commit is contained in:
parent
2f75aa1e1d
commit
2699be5296
@ -3,6 +3,7 @@
|
|||||||
require_once('services/MissionService.php');
|
require_once('services/MissionService.php');
|
||||||
require_once('mt/RankSeason.php');
|
require_once('mt/RankSeason.php');
|
||||||
require_once('mt/HashRateCommon.php');
|
require_once('mt/HashRateCommon.php');
|
||||||
|
require_once('mt/ActivityRewards.php');
|
||||||
|
|
||||||
require_once('models/Mission.php');
|
require_once('models/Mission.php');
|
||||||
require_once('models/Fragment.php');
|
require_once('models/Fragment.php');
|
||||||
@ -156,6 +157,19 @@ class OtherController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$rewards = \mt\ActivityRewards::find(myself()->_getAccountId());
|
||||||
|
if ($rewards){
|
||||||
|
foreach ($rewards as $reward){
|
||||||
|
array_push($historyList, array(
|
||||||
|
"type" => -1,
|
||||||
|
"event_name" => $reward['event_name'],
|
||||||
|
"cecVal" => $reward['cec'],
|
||||||
|
"createtime" => strtotime($reward['time'])
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'cec'=>$totalCecVal,
|
'cec'=>$totalCecVal,
|
||||||
'list'=>$historyList,
|
'list'=>$historyList,
|
||||||
|
27
webapp/mt/ActivityRewards.php
Normal file
27
webapp/mt/ActivityRewards.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace mt;
|
||||||
|
|
||||||
|
|
||||||
|
class ActivityRewards
|
||||||
|
{
|
||||||
|
public static function find($account){
|
||||||
|
$data = array();
|
||||||
|
foreach (self::getMetaList() as $mate){
|
||||||
|
if ($mate['account_id'] == $account){
|
||||||
|
array_push($data,$mate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function getMetaList()
|
||||||
|
{
|
||||||
|
if (!self::$metaList) {
|
||||||
|
self::$metaList = getMetaTable('ActivityRewards@ActivityRewards.php');
|
||||||
|
}
|
||||||
|
return self::$metaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static $metaList;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user