sync: soul-admin 页面 | 原因: 前端页面修改
This commit is contained in:
@@ -102,6 +102,9 @@ const JOURNEY_STAGES = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export function UsersPage() {
|
export function UsersPage() {
|
||||||
|
const [searchParams, setSearchParams] = useSearchParams()
|
||||||
|
const poolParam = searchParams.get('pool') // 'vip' | 'complete' | 'all' | null
|
||||||
|
|
||||||
// ===== 用户列表 state =====
|
// ===== 用户列表 state =====
|
||||||
const [users, setUsers] = useState<User[]>([])
|
const [users, setUsers] = useState<User[]>([])
|
||||||
const [total, setTotal] = useState(0)
|
const [total, setTotal] = useState(0)
|
||||||
@@ -109,12 +112,19 @@ export function UsersPage() {
|
|||||||
const [pageSize, setPageSize] = useState(10)
|
const [pageSize, setPageSize] = useState(10)
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
const debouncedSearch = useDebounce(searchTerm, 300)
|
const debouncedSearch = useDebounce(searchTerm, 300)
|
||||||
const [vipFilter, setVipFilter] = useState<'all' | 'vip'>('all')
|
const initialVipFilter = poolParam === 'vip' ? 'vip' : 'all'
|
||||||
|
const [vipFilter, setVipFilter] = useState<'all' | 'vip' | 'complete'>(initialVipFilter as 'all' | 'vip' | 'complete')
|
||||||
const [isLoading, setIsLoading] = useState(true)
|
const [isLoading, setIsLoading] = useState(true)
|
||||||
const [error, setError] = useState<string | null>(null)
|
const [error, setError] = useState<string | null>(null)
|
||||||
const [rfmSortMode, setRfmSortMode] = useState(false) // RFM 排序模式
|
const [rfmSortMode, setRfmSortMode] = useState(false)
|
||||||
const [rfmSortDir, setRfmSortDir] = useState<'desc' | 'asc'>('desc')
|
const [rfmSortDir, setRfmSortDir] = useState<'desc' | 'asc'>('desc')
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (poolParam === 'vip') setVipFilter('vip')
|
||||||
|
else if (poolParam === 'complete') setVipFilter('complete')
|
||||||
|
else if (poolParam === 'all') setVipFilter('all')
|
||||||
|
}, [poolParam])
|
||||||
|
|
||||||
// 弹框
|
// 弹框
|
||||||
const [showUserModal, setShowUserModal] = useState(false)
|
const [showUserModal, setShowUserModal] = useState(false)
|
||||||
const [showPasswordModal, setShowPasswordModal] = useState(false)
|
const [showPasswordModal, setShowPasswordModal] = useState(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user