diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index 3fe33906..8301d837 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -3,6 +3,7 @@ require_once('services/MissionService.php'); require_once('mt/RankSeason.php'); require_once('mt/HashRateCommon.php'); +require_once('mt/ActivityRewards.php'); require_once('models/Mission.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( 'cec'=>$totalCecVal, 'list'=>$historyList, diff --git a/webapp/mt/ActivityRewards.php b/webapp/mt/ActivityRewards.php new file mode 100644 index 00000000..ce12b9ea --- /dev/null +++ b/webapp/mt/ActivityRewards.php @@ -0,0 +1,27 @@ +