1
This commit is contained in:
parent
a3054bb3ef
commit
cceb61982f
@ -33,6 +33,20 @@ class Battle(object):
|
|||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
['!data', [_common.BattleHistory()], '战绩数据'],
|
['!data', [_common.BattleHistory()], '战绩数据'],
|
||||||
]
|
]
|
||||||
|
},{
|
||||||
|
'method': 'GET',
|
||||||
|
'name': 'showBattleHistory',
|
||||||
|
'desc': '战绩详情',
|
||||||
|
'group': 'Battle',
|
||||||
|
'url': 'webapp/index.php?c=Battle&a=showBattleHistory',
|
||||||
|
'params': [
|
||||||
|
_common.ReqHead(),
|
||||||
|
['battle_uniid', '', ' 战斗唯一id']
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead(),
|
||||||
|
['info', [], '战绩详情'],
|
||||||
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
self.internalApis = [
|
self.internalApis = [
|
||||||
|
@ -246,7 +246,7 @@ class BattleController extends BaseAuthedController {
|
|||||||
myself()->_rspData($data);
|
myself()->_rspData($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattleHistory(){
|
public function getBattleHistory(){$this->showBattleHistory();die;
|
||||||
$mode = getReqVal('mode', 0);
|
$mode = getReqVal('mode', 0);
|
||||||
$historyList = BattleHistory::orderBy(BattleHistory::getMyBattleHistoryByMode($mode),'desc');
|
$historyList = BattleHistory::orderBy(BattleHistory::getMyBattleHistoryByMode($mode),'desc');
|
||||||
$data = array();
|
$data = array();
|
||||||
@ -260,6 +260,26 @@ class BattleController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showBattleHistory(){
|
||||||
|
$battleUnid = getReqVal('battle_uniid', 0);
|
||||||
|
if ( !$battleUnid){
|
||||||
|
$this->_rspErr(1,'param error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$row = BattleSettlement::find($battleUnid);
|
||||||
|
if (!$row){
|
||||||
|
$this->_rspErr(1,'param error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$data = $row;
|
||||||
|
$data['data'] = json_decode($row['data'],true);
|
||||||
|
$this->_rspData(
|
||||||
|
array(
|
||||||
|
'info'=>$data
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function decReviveCoin()
|
public function decReviveCoin()
|
||||||
{
|
{
|
||||||
$num = getReqVal('num', 1);
|
$num = getReqVal('num', 1);
|
||||||
|
@ -251,10 +251,11 @@ class EventRankingController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function settlementRankingAward(){
|
public function settlementRankingAward(){
|
||||||
$currentRankingMeta = mt\EventRanking::getCurrentRanking();
|
$id = getReqVal('id', 0);
|
||||||
$awardList = array();
|
// $currentRankingMeta = mt\EventRanking::getCurrentRanking();
|
||||||
if ($currentRankingMeta){
|
// $awardList = array();
|
||||||
$lastRankingMeta = mt\EventRanking::find($currentRankingMeta['id']-1);
|
// if ($currentRankingMeta){
|
||||||
|
$lastRankingMeta = mt\EventRanking::find($id);
|
||||||
if ($lastRankingMeta){
|
if ($lastRankingMeta){
|
||||||
switch ($lastRankingMeta['themeType']){
|
switch ($lastRankingMeta['themeType']){
|
||||||
case \services\RankActivityService::KILLS_TYPE : {
|
case \services\RankActivityService::KILLS_TYPE : {
|
||||||
@ -436,7 +437,7 @@ class EventRankingController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class BattleSettlement extends BaseModel
|
|||||||
|
|
||||||
public static function find($battleUuid)
|
public static function find($battleUuid)
|
||||||
{
|
{
|
||||||
$row = SqlHelper::selectOne
|
$row = SqlHelper::ormSelectOne
|
||||||
(myself()->_getSelfMysql(),
|
(myself()->_getSelfMysql(),
|
||||||
't_battle_settlement',
|
't_battle_settlement',
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user