优化玩家DicePlayer权重输入方式
This commit is contained in:
@@ -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 ?? '') }))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user