1
This commit is contained in:
parent
3c635ed188
commit
f489a12fd3
@ -126,22 +126,65 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
public function evolve721Nft()
|
public function evolve721Nft()
|
||||||
{
|
{
|
||||||
$type = getReqVal('type', '');
|
$type = getReqVal('type', '');
|
||||||
|
$tokenId1 = getReqVal('token_id1', '');
|
||||||
|
$tokenId2 = getReqVal('token_id2', '');
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
$tokenId1 = getReqVal('token_id1', '');
|
|
||||||
$tokenId2 = getReqVal('token_id2', '');
|
|
||||||
$nft1 = Hero::findByTokenId($tokenId1);
|
$nft1 = Hero::findByTokenId($tokenId1);
|
||||||
$nft2 = Hero::findByTokenId($tokenId2);
|
$nft2 = Hero::findByTokenId($tokenId2);
|
||||||
if (!$nft1 || $nft2) {
|
if (!$nft1 || $nft2) {
|
||||||
myself()->_rspErr(1, 'token paramater error');
|
myself()->_rspErr(1, 'token paramater error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$this->internalBcCall(
|
||||||
|
array(
|
||||||
|
'c' => 'BcService',
|
||||||
|
'a' => 'evolve721Nft',
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'session_id' => myself()->_getSessionId(),
|
||||||
|
'account' => myself()->_getOpenId(),
|
||||||
|
'type' => $type,
|
||||||
|
'token_id1' => $tokenId1,
|
||||||
|
'token_id2' => $tokenId2
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'action' => Transaction::EVOLVE_721_ACTION_TYPE,
|
||||||
|
'tokenId' => '',
|
||||||
|
'itemType' => $type,
|
||||||
|
'itemUniId' => 0,
|
||||||
|
'itemId' => 0
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
|
$nft1 = Gun::findByTokenId($tokenId1);
|
||||||
|
$nft2 = Gun::findByTokenId($tokenId2);
|
||||||
|
if (!$nft1 || $nft2) {
|
||||||
|
myself()->_rspErr(1, 'token paramater error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->internalBcCall(
|
||||||
|
array(
|
||||||
|
'c' => 'BcService',
|
||||||
|
'a' => 'evolve721Nft',
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'session_id' => myself()->_getSessionId(),
|
||||||
|
'account' => myself()->_getOpenId(),
|
||||||
|
'type' => $type,
|
||||||
|
'token_id1' => $tokenId1,
|
||||||
|
'token_id2' => $tokenId2
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'action' => Transaction::EVOLVE_721_ACTION_TYPE,
|
||||||
|
'tokenId' => '',
|
||||||
|
'itemType' => $type,
|
||||||
|
'itemUniId' => 0,
|
||||||
|
'itemId' => 0
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user