This commit is contained in:
aozhiwei 2023-08-28 17:43:00 +08:00
parent b4820fe237
commit 13d39621cc

View File

@ -116,8 +116,8 @@ class StakingController extends BaseAuthedController {
{ {
$checkList = array(); $checkList = array();
{ {
$tokenIdList = getReqVal('token_id_list', ''); $tokenIdList = explode('|', getReqVal('token_id_list', ''));
$contractAddressList = getReqVal('contract_address_list', ''); $contractAddressList = explode('|', strtolower(getReqVal('contract_address_list', '')));
$netId = getReqVal('net_id', ''); $netId = getReqVal('net_id', '');
if (count($tokenIdList) <= 0) { if (count($tokenIdList) <= 0) {
myself()->_rspErr(1, 'paramater error'); myself()->_rspErr(1, 'paramater error');
@ -146,13 +146,16 @@ class StakingController extends BaseAuthedController {
if (array_key_exists($nft['token_id'], $checkList)) { if (array_key_exists($nft['token_id'], $checkList)) {
$c = $checkList[$nft['token_id']]; $c = $checkList[$nft['token_id']];
if ($c['contract_address'] == $nft['contract_address'] && if ($c['contract_address'] == $nft['contract_address'] &&
$c['net_id'] == $nft['nft_id']) { $c['net_id'] == $nft['net_id']) {
array_push($confirmedNfts, array_push($confirmedNfts,
$nft); $nft);
} }
} }
} }
} }
error_log(json_encode($_REQUEST));
error_log(json_encode($checkList));
error_log(json_encode($confirmedNfts));
if (count($checkList) != count($confirmedNfts)) { if (count($checkList) != count($confirmedNfts)) {
myself()->_rspErr(3, 'paramater error'); myself()->_rspErr(3, 'paramater error');
return; return;
@ -184,7 +187,7 @@ class StakingController extends BaseAuthedController {
foreach ($lastTimeArr as $time) { foreach ($lastTimeArr as $time) {
$days = intval($time / 30); $days = intval($time / 30);
switch ($days) { switch ($days) {
case 30: case 1:
{ {
array_push( array_push(
$items, $items,
@ -195,7 +198,7 @@ class StakingController extends BaseAuthedController {
); );
} }
break; break;
case 30 * 3: case 3:
{ {
array_push( array_push(
$items, $items,
@ -206,7 +209,7 @@ class StakingController extends BaseAuthedController {
); );
} }
break; break;
case 30 * 6: case 6:
{ {
array_push( array_push(
$items, $items,
@ -217,7 +220,7 @@ class StakingController extends BaseAuthedController {
); );
} }
break; break;
case 30 * 12: case 12:
{ {
array_push( array_push(
$items, $items,
@ -228,7 +231,7 @@ class StakingController extends BaseAuthedController {
); );
} }
break; break;
case 30 * 24: case 24:
{ {
array_push( array_push(
$items, $items,