Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb

This commit is contained in:
hujiabin 2024-07-29 15:36:39 +08:00
commit 237204ca74
2 changed files with 56 additions and 6 deletions

View File

@ -1933,3 +1933,40 @@ CREATE TABLE `t_recharge_order` (
UNIQUE KEY `order_id` (`order_id`) UNIQUE KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_switch`
--
DROP TABLE IF EXISTS `t_switch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_switch` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`switch_name` varchar(60) NOT NULL COMMENT '功能名',
`is_open` int(11) NOT NULL DEFAULT '0' COMMENT '是否开启',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `switch_name` (`switch_name`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_annc`
--
DROP TABLE IF EXISTS `t_annc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_annce` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`uniid` bigint NOT NULL DEFAULT '0' COMMENT '唯一Id',
`title` varchar(255) NOT NULL COMMENT '公告标题',
`content` int(11) NOT NULL DEFAULT '0' COMMENT '公告正文',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `uniid` (`uniid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@ -181,11 +181,17 @@ class OutAppNftController extends BaseController {
$info['token_id'] = $tokenId; $info['token_id'] = $tokenId;
$info['name'] = $heroMeta['name']; $info['name'] = $heroMeta['name'];
$info['description'] = $NftMeta['desc']; $info['description'] = $NftMeta['desc'];
$info['image'] = "https://res2.counterfire.games/nft/meta/". if ($nftDb['token_type'] == Nft::GCARD_HERO_TYPE) {
$heroDb['hero_id'].'_'.$this->getRealHeroQuality($heroDb).".gif"; $info['image'] = 'https://res2.counterfire.games/nft/video/normal/' . $heroMeta['id'] . '_c' . $this->getRealHeroQuality($heroDb) . '.mp4';
} else {
$info['image'] = 'https://res2.counterfire.games/nft/video/genesis/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.mp4';
}
if ($this->isWingHero($nftDb['token_id'])) {
$info['image'] = 'https://res2.counterfire.games/nft/video/wing/' . $heroMeta['id'] . '_w' . $this->getRealHeroQuality($heroDb) . '.mp4';
}
$info['animation_url'] = "https://res.counterfire.games/nft/video/". $info['animation_url'] = "https://res.counterfire.games/nft/video/".
$heroDb['hero_id'].'_'.$this->getRealHeroQuality($heroDb).".mp4"; $heroDb['hero_id'].'_'.$this->getRealHeroQuality($heroDb).".mp4";
if ($info['token_id'] > 6240603010001668 && $info['token_id'] <= 6240603010002168){ if ($this->isWingHero($nftDb['token_id'])) {
$info['animation_url'] = "https://res.counterfire.games/nft/video/wing/". $info['animation_url'] = "https://res.counterfire.games/nft/video/wing/".
$heroDb['hero_id'].'_w'.$this->getRealHeroQuality($heroDb).".mp4"; $heroDb['hero_id'].'_w'.$this->getRealHeroQuality($heroDb).".mp4";
} }
@ -330,11 +336,14 @@ class OutAppNftController extends BaseController {
$info['item_id'] = $heroMeta['id']; $info['item_id'] = $heroMeta['id'];
$info['type'] = $nftDb['token_type']; $info['type'] = $nftDb['token_type'];
//$info['image'] = 'https://res2.counterfire.games/nft/meta/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.gif'; //$info['image'] = 'https://res2.counterfire.games/nft/meta/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.gif';
if (($nftDb['token_type']) == Nft::GCARD_HERO_TYPE) { if ($nftDb['token_type'] == Nft::GCARD_HERO_TYPE) {
$info['image'] = 'https://res2.counterfire.games/nft/video/normal/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.mp4'; $info['image'] = 'https://res2.counterfire.games/nft/video/normal/' . $heroMeta['id'] . '_c' . $this->getRealHeroQuality($heroDb) . '.mp4';
} else { } else {
$info['image'] = 'https://res2.counterfire.games/nft/video/genesis/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.mp4'; $info['image'] = 'https://res2.counterfire.games/nft/video/genesis/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.mp4';
} }
if ($this->isWingHero($nftDb['token_id'])) {
$info['image'] = 'https://res2.counterfire.games/nft/video/wing/' . $heroMeta['id'] . '_w' . $this->getRealHeroQuality($heroDb) . '.mp4';
}
$info['detail']['quality'] = $this->getRealHeroQuality($heroDb); $info['detail']['quality'] = $this->getRealHeroQuality($heroDb);
$info['detail']['max_mining_days'] = $heroAtteMeta['validTime']; $info['detail']['max_mining_days'] = $heroAtteMeta['validTime'];
$info['detail']['wealth'] = floor($wealth * (1+$wealth_rate)); $info['detail']['wealth'] = floor($wealth * (1+$wealth_rate));
@ -530,7 +539,7 @@ class OutAppNftController extends BaseController {
$info['name'] = $heroMeta['name']; $info['name'] = $heroMeta['name'];
$info['item_id'] = $heroMeta['id']; $info['item_id'] = $heroMeta['id'];
$info['type'] = Nft::HERO_TYPE; $info['type'] = Nft::HERO_TYPE;
$info['image'] = 'https://res2.counterfire.games/nft/meta/' . $heroMeta['id'] . '_' . $this->getRealHeroQuality($heroDb) . '.gif'; $info['image'] = 'https://res2.counterfire.games/nft/video/normal/' . $heroMeta['id'] . '_c' . $this->getRealHeroQuality($heroDb) . '.mp4';
$info['detail']['quality'] = $this->getRealHeroQuality($heroDb); $info['detail']['quality'] = $this->getRealHeroQuality($heroDb);
$info['detail']['max_mining_days'] = $heroAtteMeta['validTime']; $info['detail']['max_mining_days'] = $heroAtteMeta['validTime'];
$info['detail']['wealth'] = floor($wealth * (1+$wealth_rate)); $info['detail']['wealth'] = floor($wealth * (1+$wealth_rate));
@ -546,4 +555,8 @@ class OutAppNftController extends BaseController {
myself()->_rspData($rspData); myself()->_rspData($rspData);
} }
private function isWingHero($tokenId)
{
return $tokenId > 6240603010001668 && $tokenId <= 6240603010002168;
}
} }