移除无用的接口

This commit is contained in:
aozhiwei 2021-11-17 16:58:20 +08:00
parent ac419bc178
commit 79d1141c17
3 changed files with 0 additions and 118 deletions

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
import _common
class Temp(object):
def __init__(self):
self.apis = [
{
'desc': 'getRedSum',
'group': 'Temp',
'url': 'webapp/index.php?c=Temp&a=getRedSum',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
]
},
]

View File

@ -1,43 +0,0 @@
<?php
require 'classes/Quest.php';
require 'classes/AddReward.php';
class TempController extends BaseAuthedController {
protected function getRedMysql()
{
$mysql_conf = getMysqlConfig(crc32(''));
$conn = new phpcommon\Mysql(array(
'host' => $mysql_conf['host'],
'port' => $mysql_conf['port'],
'user' => $mysql_conf['user'],
'passwd' => $mysql_conf['passwd'],
'dbname' => DBNAME_PREFIX . 1
));
return $conn;
}
public function getRedSum()
{
$type = $_REQUEST['type'];
$red_conn = $this->getRedMysql();
$rows = $red_conn->execQueryOne('SELECT * FROM redpack ' .
' WHERE red_type=:red_type AND red_date=:red_date;',
array(
':red_type' => $type,
':red_date' => phpcommon\getdayseconds(phpcommon\getNowTime())
));
error_log(json_encode($rows));
if ($rows['red_sum'] + 0.3 > 100) {
phpcommon\sendError(ERR_USER_BASE + 3, '今日红包已领完');
return;
}
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
'sum' => $rows['red_sum']
));
}
}
?>

View File

@ -1,55 +0,0 @@
<?php
class TestPhpController extends BaseAuthedController {
public function testPhpFunc()
{
//_REQUEST
$account_id = $_REQUEST['account_id'];;
$conn = $this->getMysql($account_id);
if (!$conn) {
error_log("没有这个玩家测试======".$conn);
}
else
{
error_log("cesMySqlConnet");
}
$ii = 1;
// $row = $conn->execQueryOne('SELECT guildcoin_num FROM user WHERE accountid=:accountid;',
// array(
// ':accountid' => $account_id
// ));
$row = $conn->execQueryOne('SELECT * FROM user ');
if($row) {
error_log("Test1======");
}
else{
error_log("Test2=======");
}
$this->sendDataToClient(0,"test",$row);
// echo json_encode(array(
// 'errcode' => 0,
// 'errmsg' => '',
// 'data' => $row,
// ));
// ;
// error_log("FromPhpTest6".$_REQUEST);
// error_log("FromPhpTest3".$_REQUEST["name"]);
}
public function testPhpFunc2()
{
echo json_encode("name=");
error_log("FromPhpTest2");
//三方势力 经济贸易中心城池放好,有等级限制,我在这个国家能做写什么
//我茅草屋开始建造
//建筑设施 铁匠铺,民屋 饭店 酒馆 ,训练营
//饭店 酒馆
//
}
}