1
This commit is contained in:
parent
3fd99ce02a
commit
a50a11aaff
@ -169,7 +169,54 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
public function shardMixByUser()
|
public function shardMixByUser()
|
||||||
{
|
{
|
||||||
$tokenIds = explode('|', getReqVal('token_ids', ''));
|
$tokenIds = explode('|', getReqVal('token_ids', ''));
|
||||||
|
$tokenId = '';
|
||||||
|
$tokenType = '';
|
||||||
|
$itemId = 0;
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
'c' => 'BcService',
|
||||||
|
'a' => 'shardMixByUser',
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'session_id' => myself()->_getSessionId(),
|
||||||
|
'account' => myself()->_getOpenId(),
|
||||||
|
'token_id' => $tokenId,
|
||||||
|
'token_type' => $tokenType,
|
||||||
|
'item_uniid' => $itemUniId,
|
||||||
|
'item_id' => $itemId,
|
||||||
|
'token_ids' => implode('|', $tokenIds)
|
||||||
|
);
|
||||||
|
{
|
||||||
|
$url = self::getWeb3ServiceUrl();
|
||||||
|
$response = '';
|
||||||
|
if (!phpcommon\HttpClient::get
|
||||||
|
($url,
|
||||||
|
$params,
|
||||||
|
$response)) {
|
||||||
|
myself()->_rspErr(500, 'server internal error');
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
error_log($response);
|
||||||
|
$rspObj = json_decode($response, true);
|
||||||
|
if ($rspObj['errcode'] == 0) {
|
||||||
|
$transId = $rspObj['trans_id'];
|
||||||
|
Transaction::add(
|
||||||
|
$transId,
|
||||||
|
Transaction::SHARD_MIX_BY_USER_ACTION_TYPE,
|
||||||
|
$tokenId,
|
||||||
|
$tokenType,
|
||||||
|
0,
|
||||||
|
$itemId
|
||||||
|
);
|
||||||
|
myself()->_rspData(array(
|
||||||
|
'trans_id' => $transId,
|
||||||
|
'params' => $rspObj['params']
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
myself()->_rspErr(500, 'server internal error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function internalActivate721Nft($tokenId, $tokenType, $itemUniId, $itemId)
|
private function internalActivate721Nft($tokenId, $tokenType, $itemUniId, $itemId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user