import { request } from '@umijs/max'
import webpath from '@/utils/webPath'

export async function query() {
  return request('/api/users')
}

export async function queryCurrent(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/auth/currentUser`, {
      method: 'POST',
      data: {
          ...params,
          method: 'query',
          headers: {
              Authorization: localStorage.getItem('antd-token-authority')
          }
      }
  })
}

export async function queryNotices() {
  return request(`/${webpath.portalwebpath}/web/api/service/api/notices`)
}
