配置后台接口中英文对照

This commit is contained in:
2026-03-17 16:31:31 +08:00
parent 683bd5d97a
commit eb8123c7b3
7 changed files with 295 additions and 30 deletions

View File

@@ -92,7 +92,7 @@ class DiceRewardLogic
$tier = DiceRewardConfig::where('id', $id)->value('tier');
if ($tier === null || $tier === '') {
throw new ApiException('配置ID ' . $id . ' 不存在或档位为空');
throw new ApiException(\app\api\util\ApiLang::translateParams('配置ID %s 不存在或档位为空', [$id]));
}
$tier = (string) $tier;
@@ -318,7 +318,10 @@ class DiceRewardLogic
$configCount = count($list);
if ($configCount < self::BOARD_SIZE) {
throw new ApiException(
'奖励配置需覆盖 26 个格位id 0-25 或 1-26当前仅 ' . $configCount . ' 条,无法完整生成 5-30 共26个点数、顺时针与逆时针的奖励对照'
\app\api\util\ApiLang::translateParams(
'奖励配置需覆盖 26 个格位id 0-25 或 1-26当前仅 %s 条,无法完整生成 5-30 共26个点数、顺时针与逆时针的奖励对照',
[$configCount]
)
);
}