import request from '@/utils/request'
import qs from 'qs'
let api = '/api-web'

export function addZero (data) {
  return request({
    url: api + '/sporadicChargeInfo/add',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function updateZero (data) {
  return request({
    url: api + '/sporadicChargeInfo/update',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function getZero (data) {
  return request({
    url: api + '/sporadicChargeInfo/queryPage',
    method: 'GET',
    params: data
  })
}

export function removeZero (data) {
  return request({
    url: api + '/sporadicChargeInfo/delete',
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 根据用户编号获取用户信息
export function getBasic (data) {
  return request({
    url: '/api-auth/user/getBasic',
    method: 'get',
    params: data
  })
}

// 修改缴费状态
export function updateOpenFlag (data) {
  return request({
    url: api + '/sporadicChargeInfo/updateOpenFlag',
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 所属乐团
export function queryOrganMusicInfos(data) {
  return request({
    url: api + '/musicGroup/queryOrganMusicInfos',
    method: 'get',
    params: data
  })
}

// 所属乐团
export function queryUserMusicInfos(data) {
  return request({
    url: api + '/studentManage/queryUserMusicInfos',
    method: 'get',
    params: data
  })
}
