Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb

This commit is contained in:
hujiabin 2024-07-02 15:08:32 +08:00
commit a33c6a327c
3 changed files with 38 additions and 5 deletions

View File

@ -82,7 +82,7 @@ class AALogin(object):
{ {
'method': 'POST', 'method': 'POST',
'name': 'auth2', 'name': 'auth2',
'desc': '登录验证', 'desc': '登录验证(errcode == 505 需要验证码)',
'group': '!AALogin', 'group': '!AALogin',
'url': 'https://login-test.kingsome.cn/webapp/index.php?c=Login&a=auth2', 'url': 'https://login-test.kingsome.cn/webapp/index.php?c=Login&a=auth2',
'is_json_params': True, 'is_json_params': True,
@ -97,6 +97,36 @@ class AALogin(object):
['server_time', 0, '回合制专用字段-服务器当前utc时间'], ['server_time', 0, '回合制专用字段-服务器当前utc时间'],
] ]
}, },
{
'method': 'POST',
'name': 'verifyAccount',
'desc': '校验账号信息',
'group': '!AALogin',
'url': 'https://login-test.kingsome.cn/webapp/index.php?c=Login&a=verifyAccount',
'is_json_params': True,
'params': [
['data', '', 'idtoken'],
],
'response': [
_common.RspHead(),
['state', '', '账号状态 1:可以直接进游戏 2:需要兑换码'],
]
},
{
'method': 'POST',
'name': 'useExchangeCode',
'desc': '使用兑换码',
'group': '!AALogin',
'url': 'https://login-test.kingsome.cn/webapp/index.php?c=Login&a=useExchangeCode',
'is_json_params': True,
'params': [
['exchange_code', '', '兑换码'],
['data', '', 'idtoken'],
],
'response': [
_common.RspHead(),
]
},
{ {
'name': 'getSwitch', 'name': 'getSwitch',
'desc': '获取开关', 'desc': '获取开关',

View File

@ -135,6 +135,7 @@ class OutAppNftController extends BaseController {
$tokenType = getReqVal('token_type', ''); $tokenType = getReqVal('token_type', '');
$tokenId = getReqVal('token_id', ''); $tokenId = getReqVal('token_id', '');
$info = array( $info = array(
"token_id" => '',
"name" => "", "name" => "",
"description" => "", "description" => "",
"image" => "", "image" => "",
@ -151,6 +152,7 @@ class OutAppNftController extends BaseController {
} }
$heroMeta = \mt\Hero::get($heroDb['hero_id']); $heroMeta = \mt\Hero::get($heroDb['hero_id']);
$NftMeta = \mt\NftDesc::getByItemId($heroDb['hero_id']); $NftMeta = \mt\NftDesc::getByItemId($heroDb['hero_id']);
$info['token_id'] = $tokenId;
$info['name'] = $heroMeta['name']; $info['name'] = $heroMeta['name'];
$info['description'] = $NftMeta['desc']; $info['description'] = $NftMeta['desc'];
$info['image'] = "https://res2.counterfire.games/nft/meta/".$heroDb['hero_id'].'_'.$heroDb['quality'].".gif"; $info['image'] = "https://res2.counterfire.games/nft/meta/".$heroDb['hero_id'].'_'.$heroDb['quality'].".gif";
@ -167,6 +169,7 @@ class OutAppNftController extends BaseController {
case Nft::GOLD_BULLION_TYPE: case Nft::GOLD_BULLION_TYPE:
{ {
$nftMeta = \mt\NftDesc::getByItemId($nftDb['item_id']); $nftMeta = \mt\NftDesc::getByItemId($nftDb['item_id']);
$info['token_id'] = $tokenId;
$info['name'] = $nftMeta['name']; $info['name'] = $nftMeta['name'];
$info['description'] = $nftMeta['desc']; $info['description'] = $nftMeta['desc'];
$info['image'] = "https://res2.counterfire.games/nft/meta/".$nftDb['item_id'].".png"; $info['image'] = "https://res2.counterfire.games/nft/meta/".$nftDb['item_id'].".png";

View File

@ -13,10 +13,10 @@ class ToolsController extends BaseController {
public function _handlePre() public function _handlePre()
{ {
parent::_handlePre(); parent::_handlePre();
// if (SERVER_ENV == _ONLINE) { if (SERVER_ENV == _ONLINE) {
// die("can't create ToolsController"); die("can't create ToolsController");
// return; return;
// } }
} }
public function test() public function test()