优化显示快速下单金额

This commit is contained in:
2026-04-12 18:04:28 +08:00
parent 5755bea748
commit e5f0f28978
2 changed files with 20 additions and 14 deletions

View File

@@ -490,15 +490,17 @@
const min = this.minBet || 100;
const max = this.maxBet || 50000;
// 默认比例1x, 5x, 10x, 50x, 100x (基于最小下注)
// 同时确保不超过最大下注
return [
// 生成阶梯:最小值, 10, 100倍, 500倍, 最大值
// 并确保每个阶梯都不超过最大值最后去重排序取前5个
let steps = [
min,
Math.min(min * 5, max),
Math.min(min * 10, max),
Math.min(min * 50, max),
Math.min(min * 100, max)
].filter((v, i, a) => a.indexOf(v) === i); // 去重
min * 10,
min * 100,
min * 500,
max
].map(v => Math.min(v, max));
return [...new Set(steps)].sort((a, b) => a - b).slice(0, 5);
},
/**

View File

@@ -434,13 +434,17 @@
get quickBetAmounts() {
const min = this.minBet || 100;
const max = this.maxBet || 100000;
return [
// 生成阶梯:最小值, 10倍, 100倍, 500倍, 最大值
let steps = [
min,
Math.min(min * 5, max),
Math.min(min * 10, max),
Math.min(min * 50, max),
Math.min(min * 100, max)
].filter((v, i, a) => a.indexOf(v) === i);
min * 10,
min * 100,
min * 500,
max
].map(v => Math.min(v, max));
return [...new Set(steps)].sort((a, b) => a - b).slice(0, 5);
},
/**