优化显示快速下单金额
This commit is contained in:
@@ -490,15 +490,17 @@
|
|||||||
const min = this.minBet || 100;
|
const min = this.minBet || 100;
|
||||||
const max = this.maxBet || 50000;
|
const max = this.maxBet || 50000;
|
||||||
|
|
||||||
// 默认比例:1x, 5x, 10x, 50x, 100x (基于最小下注)
|
// 生成阶梯:最小值, 10倍, 100倍, 500倍, 最大值
|
||||||
// 同时确保不超过最大下注
|
// 并确保每个阶梯都不超过最大值,最后去重排序取前5个
|
||||||
return [
|
let steps = [
|
||||||
min,
|
min,
|
||||||
Math.min(min * 5, max),
|
min * 10,
|
||||||
Math.min(min * 10, max),
|
min * 100,
|
||||||
Math.min(min * 50, max),
|
min * 500,
|
||||||
Math.min(min * 100, max)
|
max
|
||||||
].filter((v, i, a) => a.indexOf(v) === i); // 去重
|
].map(v => Math.min(v, max));
|
||||||
|
|
||||||
|
return [...new Set(steps)].sort((a, b) => a - b).slice(0, 5);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -434,13 +434,17 @@
|
|||||||
get quickBetAmounts() {
|
get quickBetAmounts() {
|
||||||
const min = this.minBet || 100;
|
const min = this.minBet || 100;
|
||||||
const max = this.maxBet || 100000;
|
const max = this.maxBet || 100000;
|
||||||
return [
|
|
||||||
|
// 生成阶梯:最小值, 10倍, 100倍, 500倍, 最大值
|
||||||
|
let steps = [
|
||||||
min,
|
min,
|
||||||
Math.min(min * 5, max),
|
min * 10,
|
||||||
Math.min(min * 10, max),
|
min * 100,
|
||||||
Math.min(min * 50, max),
|
min * 500,
|
||||||
Math.min(min * 100, max)
|
max
|
||||||
].filter((v, i, a) => a.indexOf(v) === i);
|
].map(v => Math.min(v, max));
|
||||||
|
|
||||||
|
return [...new Set(steps)].sort((a, b) => a - b).slice(0, 5);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user