优化玩家DicePlayer权重输入方式

This commit is contained in:
2026-03-07 11:51:34 +08:00
parent 4b6bbab9d1
commit 282d73a203
6 changed files with 241 additions and 35 deletions

View File

@@ -71,5 +71,17 @@ export default {
url: '/dice/player/DicePlayer/updateStatus',
data: params
})
},
/**
* 获取彩金池配置选项DiceLotteryConfig.id、name供 lottery_config_id 下拉使用
* @returns [ { id, name } ]
*/
async getLotteryConfigOptions(): Promise<Array<{ id: number; name: string }>> {
const res = await request.get<any>({
url: '/dice/player/DicePlayer/getLotteryConfigOptions'
})
const rows = (Array.isArray(res) ? res : (res?.data ?? [])) as Array<{ id: number; name: string }>
return rows.map((r) => ({ id: Number(r.id), name: String(r.name ?? r.id ?? '') }))
}
}