NPlayer merge to NPlayerInfo
This commit is contained in:
parent
d2bf465b9a
commit
cba7e7616a
@ -1,31 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import _common
|
||||
|
||||
class NPlayer(object):
|
||||
|
||||
def __init__(self):
|
||||
self.apis = [
|
||||
{
|
||||
'desc': 'getGunInfo',
|
||||
'group': 'NPlayer',
|
||||
'url': 'webapp/index.php?c=NPlayer&a=getGunInfo',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
{
|
||||
'desc': 'getPlayerLv',
|
||||
'group': 'NPlayer',
|
||||
'url': 'webapp/index.php?c=NPlayer&a=getPlayerLv',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
]
|
@ -61,4 +61,26 @@ class NPlayerInfo(object):
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
{
|
||||
'desc': 'getGunInfo',
|
||||
'group': 'NPlayer',
|
||||
'url': 'webapp/index.php?c=NPlayer&a=getGunInfo',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
{
|
||||
'desc': 'getPlayerLv',
|
||||
'group': 'NPlayer',
|
||||
'url': 'webapp/index.php?c=NPlayer&a=getPlayerLv',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
class NPlayerController extends BaseAuthedController {
|
||||
|
||||
public function getGunInfo()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
$conn = $this->getMysql($account_id);
|
||||
|
||||
// $row = $conn->execQueryOne('SELECT guildcoin_num FROM user WHERE accountid=:accountid;',
|
||||
// array(
|
||||
// ':accountid' => $account_id
|
||||
// ));
|
||||
$sqlStr = "SELECT * FROM gun_intensify WHERE accountid=:accountid; ";
|
||||
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
|
||||
|
||||
$this->sendDataToClient(0,"test02",$row);
|
||||
}
|
||||
public function getPlayerLv()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
$conn = $this->getMysql($account_id);
|
||||
|
||||
|
||||
$sqlStr = "SELECT lv,lv_exp,money_of_week FROM user WHERE accountid=:accountid; ";
|
||||
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
|
||||
if($row) {
|
||||
|
||||
}
|
||||
$this->sendDataToClient(100,"getPlayerLv",$row);
|
||||
}
|
||||
}
|
@ -229,4 +229,32 @@ class NPlayerInfoController extends BaseAuthedController {
|
||||
// $sqlStr = "SELECT * FROM user WHERE accountid=:accountid; ";
|
||||
// $row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
|
||||
}
|
||||
public function getGunInfo()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
$conn = $this->getMysql($account_id);
|
||||
|
||||
// $row = $conn->execQueryOne('SELECT guildcoin_num FROM user WHERE accountid=:accountid;',
|
||||
// array(
|
||||
// ':accountid' => $account_id
|
||||
// ));
|
||||
$sqlStr = "SELECT * FROM gun_intensify WHERE accountid=:accountid; ";
|
||||
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
|
||||
|
||||
$this->sendDataToClient(0,"test02",$row);
|
||||
}
|
||||
public function getPlayerLv()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
$conn = $this->getMysql($account_id);
|
||||
|
||||
|
||||
$sqlStr = "SELECT lv,lv_exp,money_of_week FROM user WHERE accountid=:accountid; ";
|
||||
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
|
||||
if($row) {
|
||||
|
||||
}
|
||||
$this->sendDataToClient(100,"getPlayerLv",$row);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ $rewriteRule = array(
|
||||
'Property' => 'Role',
|
||||
'NBag' => 'Bag',
|
||||
'NHero' => 'Hero',
|
||||
'NPlayer' => 'NPlayerInfo',
|
||||
);
|
||||
|
||||
function getRewriteClass($oldC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user