1
This commit is contained in:
parent
7608982460
commit
5918b2a7e3
@ -219,9 +219,20 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function internalBcCall($params, $transParams, $cb = null) {
|
private function internalActivate721Nft($tokenId, $tokenType, $itemUniId, $itemId)
|
||||||
$propertyChgService = new services\PropertyChgService();
|
{
|
||||||
$propertyChgService->addUserChg();
|
$params = array(
|
||||||
|
'c' => 'BcService',
|
||||||
|
'a' => 'activate721Nft',
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'session_id' => myself()->_getSessionId(),
|
||||||
|
'account' => myself()->_getAddress(),
|
||||||
|
'token_id' => $tokenId,
|
||||||
|
'token_type' => $tokenType,
|
||||||
|
'item_uniid' => $itemUniId,
|
||||||
|
'item_id' => $itemId
|
||||||
|
);
|
||||||
|
{
|
||||||
$url = self::getWeb3ServiceUrl();
|
$url = self::getWeb3ServiceUrl();
|
||||||
$response = '';
|
$response = '';
|
||||||
if (!phpcommon\HttpClient::get
|
if (!phpcommon\HttpClient::get
|
||||||
@ -238,27 +249,23 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
$transId = $rspObj['trans_id'];
|
$transId = $rspObj['trans_id'];
|
||||||
Transaction::add(
|
Transaction::add(
|
||||||
$transId,
|
$transId,
|
||||||
$transParams['action'],
|
Transaction::MINT_721_ACTION_TYPE,
|
||||||
$transParams['tokenId'],
|
$tokenId,
|
||||||
$transParams['tokenType'],
|
$tokenType,
|
||||||
$transParams['itemUniId'],
|
$itemUniId,
|
||||||
$transParams['itemId'],
|
$itemId,
|
||||||
$transParams['result']
|
1
|
||||||
);
|
);
|
||||||
if ($cb) {
|
|
||||||
$cb($transId);
|
|
||||||
}
|
|
||||||
myself()->_rspData(array(
|
myself()->_rspData(array(
|
||||||
'trans_id' => $transId,
|
'trans_id' => $transId,
|
||||||
'params' => $rspObj['params'],
|
'params' => $rspObj['params']
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
myself()->_rspErr(500, 'server internal error');
|
myself()->_rspErr(500, 'server internal error');
|
||||||
die();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static function getWeb3ServiceUrl()
|
private static function getWeb3ServiceUrl()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user