import httpRequest from '@/utils/axios'

// 获取城市列表
export function getCityList() {
  return httpRequest.get('/api/alumni/v1/vote/city')
}

// 是否投票
export function checkVote() {
  return httpRequest.get('/api/alumni/v1/vote/hasvote')
}

// 获取投票状态
export function getVoteStatus() {
  return httpRequest.get('/api/alumni/v1/vote/status')
}

// 获取投票列表
export function getVoteList(params) {
  return httpRequest.get('/api/alumni/v1/vote/candidate/list', { params })
}

// 获取投票item
export function getVoteItem(id) {
  return httpRequest.get(`/api/alumni/v1/vote/candidate/detail/${id}`)
}

// 提交投票
export function addVote(data) {
  return httpRequest.post('/api/alumni/v1/vote/add', data)
}

// 提交报名信息
export function submitApply(data) {
  return httpRequest.post('/api/alumni//v1/vote/create', data)
}
// 获取投票城市
export function getApplyCity() {
  return httpRequest.get('/api/alumni/v1/vote/vote-config-new')
}
