更新sse过滤主播金币

This commit is contained in:
2026-03-19 17:53:28 +08:00
parent 9afbe92a18
commit 9e1628b11a
2 changed files with 19 additions and 2 deletions

View File

@@ -43,6 +43,14 @@
<el-input-number v-model="filters.max_onlineFans" :min="0" size="small" controls-position="right"
placeholder="最大" class="filter-input-number" />
<!-- 主播金币 -->
<span class="filter-label">主播金币</span>
<el-input-number v-model="filters.min_hostsCoins" :min="0" size="small" controls-position="right"
placeholder="最小" class="filter-input-number" />
<span>~</span>
<el-input-number v-model="filters.max_hostsCoins" :min="0" size="small" controls-position="right"
placeholder="最大" class="filter-input-number" />
<!-- 主播等级多选 -->
<span class="filter-label">主播等级</span>
<el-tree-select v-model="filters.hostslevel" :data="levelTreeData" multiple show-checkbox collapse-tags
@@ -108,6 +116,8 @@ const defaultFilters = {
ordinary: null,
min_onlineFans: null,
max_onlineFans: null,
min_hostsCoins: null,
max_hostsCoins: null,
hostslevel: []
}
@@ -238,6 +248,8 @@ async function resetFilter() {
filters.ordinary = true
filters.min_onlineFans = null
filters.max_onlineFans = null
filters.min_hostsCoins = null
filters.max_hostsCoins = null
filters.hostslevel = [] // 清空多选
// 恢复默认列表
hosts.value = await getStoredHostList()

View File

@@ -309,7 +309,7 @@ watch(sseCrawlerEnabled, v => {
watch(sseBossEnabled, v => {
localStorage.setItem('SSE_BOSS_ENABLED', JSON.stringify(v))
})
watch(sseCrawlerLimit, v => {
@@ -1788,7 +1788,7 @@ const onToggleCrawler = (val) => {
// 互斥逻辑
if (val) {
sseBossEnabled.value = false
window.electronAPI.toggleMq('boss', false)
window.electronAPI.toggleMq('boss', false)
}
// 真正同步给后端 / MQ
@@ -1875,6 +1875,8 @@ function matchByHostFilters(payload) {
const {
min_onlineFans,
max_onlineFans,
min_hostsCoins,
max_hostsCoins,
hostslevel,
gold, // 新增
ordinary, // 新增
@@ -1882,12 +1884,15 @@ function matchByHostFilters(payload) {
const {
onlineFans,
hostsCoins,
level,
invitationType,
} = payload
// 在线人数
if (!matchRange(onlineFans, min_onlineFans, max_onlineFans)) return false
// 主播金币
if (!matchRange(hostsCoins, min_hostsCoins, max_hostsCoins)) return false
// 等级
if (!matchLevel(level, hostslevel)) return false
// 金票 / 普票