fix(dashboard): 修复筛号器波色按钮无效和尾号逻辑错误
1. 波色按钮class名nf-color与容器id冲突,改为nf-color-btn 2. 尾号选择改为屏蔽选中尾号的号码(之前是反向逻辑)
This commit is contained in:
@@ -777,10 +777,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
'</div>' +
|
'</div>' +
|
||||||
'<div style="margin-bottom:15px;">' +
|
'<div style="margin-bottom:15px;">' +
|
||||||
' <label style="margin-right:10px;">波色:</label>' +
|
' <label style="margin-right:10px;">波色:</label>' +
|
||||||
' <div id="nf-color" style="display:inline-flex;gap:6px;">' +
|
' <div id="nf-colorwrap" style="display:inline-flex;gap:6px;">' +
|
||||||
' <button class="btn btn-default btn-xs nf-color" data-color="红" style="color:#e74c3c;">红波</button>' +
|
' <button class="btn btn-default btn-xs nf-color-btn" data-color="红" style="color:#e74c3c;">红波</button>' +
|
||||||
' <button class="btn btn-default btn-xs nf-color" data-color="蓝" style="color:#3498db;">蓝波</button>' +
|
' <button class="btn btn-default btn-xs nf-color-btn" data-color="蓝" style="color:#3498db;">蓝波</button>' +
|
||||||
' <button class="btn btn-default btn-xs nf-color" data-color="绿" style="color:#2ecc71;">绿波</button>' +
|
' <button class="btn btn-default btn-xs nf-color-btn" data-color="绿" style="color:#2ecc71;">绿波</button>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div id="nf-numbers" style="display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;"></div>' +
|
'<div id="nf-numbers" style="display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;"></div>' +
|
||||||
@@ -809,7 +809,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 波色按钮点击
|
// 波色按钮点击
|
||||||
$('.nf-color', layero).on('click', function () {
|
$('.nf-color-btn', layero).on('click', function () {
|
||||||
var $btn = $(this);
|
var $btn = $(this);
|
||||||
$btn.toggleClass('btn-default').toggleClass('btn-gray');
|
$btn.toggleClass('btn-default').toggleClass('btn-gray');
|
||||||
Controller.api.applyNumberFilters(layero);
|
Controller.api.applyNumberFilters(layero);
|
||||||
@@ -819,7 +819,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
$('.btn-nf-reset', layero).on('click', function () {
|
$('.btn-nf-reset', layero).on('click', function () {
|
||||||
$('#nf-tail', layero).val('');
|
$('#nf-tail', layero).val('');
|
||||||
$('.nf-zodiac', layero).removeClass('btn-gray').addClass('btn-default');
|
$('.nf-zodiac', layero).removeClass('btn-gray').addClass('btn-default');
|
||||||
$('.nf-color', layero).removeClass('btn-gray').addClass('btn-default');
|
$('.nf-color-btn', layero).removeClass('btn-gray').addClass('btn-default');
|
||||||
Controller.api.applyNumberFilters(layero);
|
Controller.api.applyNumberFilters(layero);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -854,7 +854,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
});
|
});
|
||||||
// 收集被点击(置灰)的波色
|
// 收集被点击(置灰)的波色
|
||||||
var excludedColors = [];
|
var excludedColors = [];
|
||||||
$('.nf-color.btn-gray', layero).each(function () {
|
$('.nf-color-btn.btn-gray', layero).each(function () {
|
||||||
excludedColors.push($(this).data('color'));
|
excludedColors.push($(this).data('color'));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -867,8 +867,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
|
|
||||||
var hidden = false;
|
var hidden = false;
|
||||||
|
|
||||||
// 尾号筛选:选择了具体尾号则隐藏不匹配的
|
// 尾号筛选:选择了具体尾号则屏蔽该尾号
|
||||||
if (tailVal !== '' && parseInt(tailVal) !== tail) {
|
if (tailVal !== '' && parseInt(tailVal) === tail) {
|
||||||
hidden = true;
|
hidden = true;
|
||||||
}
|
}
|
||||||
// 排除的生肖
|
// 排除的生肖
|
||||||
|
|||||||
Reference in New Issue
Block a user