|
@@ -426,12 +426,8 @@ class Goods extends Controller
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $redis = new Redis();
|
|
|
- $zhuzao_count = $redis->Llen('collectionHash_'.$c_id);
|
|
|
- if ($zhuzao_count<$number){
|
|
|
- $this->error('铸造的的数量不足,无法赠送',[],3);
|
|
|
- }
|
|
|
-
|
|
|
+ $is_nft = Db::name('hash2')->where('goods_id',$c_id)->where('success',1)->find();
|
|
|
+ if (!$is_nft) $this->error('nft未上架,无法赠送','',3);
|
|
|
$inventory = getCollectionInventory($c_id);
|
|
|
|
|
|
if ($inventory<1) $this->error('已售罄');
|
|
@@ -467,10 +463,8 @@ class Goods extends Controller
|
|
|
'cover'=>$info['cover'],
|
|
|
'type'=>$info['type'],
|
|
|
'pro_info'=>json_encode($info,true),
|
|
|
- 'company'=>$company,
|
|
|
- 'company_hash'=>$company_hash,
|
|
|
- 'company_hash_time'=>$company_hash_time,
|
|
|
- 'ddcid'=>$tokenid,
|
|
|
+ 'tokenid'=>$is_nft['class_id'],
|
|
|
+ 'nfttype'=>$is_nft['operationId'],
|
|
|
'collectors_hash'=>$collectors_hash,
|
|
|
'collectors_hash_time'=>''
|
|
|
];
|