Commit 7a9c3356 authored by luluxia's avatar luluxia

feat: 增加适配新前端的接口

parent 7e763606
This diff is collapsed.
...@@ -706,7 +706,11 @@ ob_clean(); ...@@ -706,7 +706,11 @@ ob_clean();
$jgamedata = compatible_json_encode($gamedata); $jgamedata = compatible_json_encode($gamedata);
//$json = new Services_JSON(); //$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata); //$jgamedata = $json->encode($gamedata);
echo $jgamedata; if (!strstr($_SERVER['HTTP_REFERER'], 'php')) {
include './api.php';
} else {
echo $jgamedata;
}
ob_end_flush(); ob_end_flush();
//$t_e=getmicrotime(); //$t_e=getmicrotime();
......
...@@ -162,6 +162,10 @@ if(isset($clbpara['dialogue'])) ...@@ -162,6 +162,10 @@ if(isset($clbpara['dialogue']))
$dialogue_id = $clbpara['dialogue']; $dialogue_id = $clbpara['dialogue'];
} }
include template('game'); if (!strstr($_SERVER['HTTP_REFERER'], 'php')) {
include './api.php';
} else {
include template('game');
}
?> ?>
...@@ -194,6 +194,7 @@ namespace revbattle ...@@ -194,6 +194,7 @@ namespace revbattle
{ {
global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta,$cskills; global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta,$cskills;
global $fog,$pdata; global $fog,$pdata;
global $battle_skills;
//格式化双方clbpara //格式化双方clbpara
$edata['clbpara'] = get_clbpara($edata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment