import { useState, useEffect } from "react";
import { getList } from '@/services/org'

export default function useOrgList() {
  const showType = 0; // 不显示报错
  const [orgList, setOrgList] = useState([])

  useEffect(() => {
    getList({ pageSize: 999 }, showType).then(res => {
      setOrgList(res.records || [])
    })
  }, [])

  return { orgList }
}
