feat(listings): 押金筛选高档位细分为 200-400 / 400-600 / 600以上

- 桌面高级筛选「押金」去掉 200以上,改为 200-400 并新增 400-600、600以上
- 移动端押金档位改为复用 depositRangeOptions,两端档位保持一致
- 补充 depositRangeOptions 档位与边界断言
This commit is contained in:
yml2213
2026-10-07 16:53:37 +08:00
parent b4d6718c8e
commit 6b74e07e70
3 changed files with 41 additions and 8 deletions
@@ -40,6 +40,7 @@ import {
storeHomeQuery,
type HomeQueryValue,
} from '@/features/listings/composables/useHomeFilterQuery'
import { depositRangeOptions } from '@/features/listings/composables/useFilterOptions'
import {
getListingChips,
getListingDisplayPrice,
@@ -138,6 +139,15 @@ const zoneOptions = [
{ key: 'highCoin', label: '高币', hint: '100M以上' },
]
/** 押金档位直接复用首页高级筛选项,保证移动端与桌面端完全一致 */
const depositPresets = depositRangeOptions
.filter(option => option.label !== '全部')
.map(option => ({
label: option.label,
min: option.min === undefined ? '' : String(option.min),
max: option.max === undefined ? '' : String(option.max),
}))
const rangePresets: Record<string, Array<{ label: string; min: string; max: string }>> = {
price: [
{ label: '50-100', min: '50', max: '100' },
@@ -154,12 +164,7 @@ const rangePresets: Record<string, Array<{ label: string; min: string; max: stri
{ label: '30-40', min: '30', max: '40' },
{ label: '40以上', min: '40', max: '' },
],
deposit: [
{ label: '0-50', min: '0', max: '50' },
{ label: '50-100', min: '50', max: '100' },
{ label: '100-200', min: '100', max: '200' },
{ label: '200以上', min: '200', max: '' },
],
deposit: depositPresets,
total: [
{ label: '0-500', min: '0', max: '500' },
{ label: '500-1000', min: '500', max: '1000' },