新增统计,小游戏,系统设置

This commit is contained in:
2026-06-11 13:49:20 +08:00
parent 3120c56620
commit 064ba727e0
11 changed files with 827 additions and 144 deletions

View File

@@ -18,10 +18,9 @@ class UserScoreLog extends model
protected $updateTime = false;
const GAME_TYPE_LIST = [
1001 => 'Lucky Wheel', // 大转盘
1002 => 'Golden Eggs', // 砸金蛋
1003 => 'Daily Mission', // 每日任务
1004 => 'Plinko Ball', // 普林科弹球
268 => 'plinko ball',
269 => 'smash eggs',
270 => 'spin wheel',
];
public static function onBeforeDelete(): bool
@@ -37,13 +36,9 @@ class UserScoreLog extends model
public function getGameTypeTextAttr($value, $data)
{
$gameType = $data['game_type'] ?? 0;
// 如果需要严格的多语言,可以在这里根据 $lang 切换,或者直接配合系统的 lang() 助手函数
// 这里我们先直接返回对应的标准国际化名称
return self::GAME_TYPE_LIST[$gameType] ?? 'Unknown Game';
}
// 3. 别忘了把获取器追加到模型的可见输出数组里
protected $append = ['game_type_text'];
}