This commit is contained in:
hujiabin 2024-08-19 19:30:29 +08:00
parent fde8b72a8b
commit ee3103c7f3
2 changed files with 35 additions and 37 deletions

View File

@ -130,7 +130,6 @@ class Nft extends BaseModel
array_push($nftList, $row); array_push($nftList, $row);
} }
); );
error_log(json_encode($nftList));
return $nftList; return $nftList;
} }

View File

@ -1,36 +1,35 @@
<?php <?php
namespace mt; namespace mt;
use phpcommon; use phpcommon;
class PveGeminiMode { class PveGeminiMode {
public static function get($id) public static function get($id)
{ {
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null; return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
} }
public static function calcStar($meta, $score) public static function calcStar($meta, $score)
{ {
$strs = explode('|', $meta['score_reward']); $strs = explode('|', $meta['score_reward']);
error_log(json_encode($strs)); for ($i = count($strs) - 1; $i >= 0; --$i) {
for ($i = count($strs) - 1; $i >= 0; --$i) { if ($score > $strs[$i]) {
if ($score > $strs[$i]) { return count($strs) - $i ;
return count($strs) - $i ; }
} }
} return 0;
return 0; }
}
protected static function getMetaList()
protected static function getMetaList() {
{ if (!self::$metaList) {
if (!self::$metaList) { self::$metaList = getMetaTable('pveGeminiMode@pveGeminiMode.php');
self::$metaList = getMetaTable('pveGeminiMode@pveGeminiMode.php'); }
} return self::$metaList;
return self::$metaList; }
}
protected static $metaList;
protected static $metaList;
}
}