import request from '@/utils/request'

/**
 *编辑机构
 */
export function addNewClub(query) {
  return request({
    url: '/user/cmUserOrganize/toAddClubUser',
    method: 'get',
    params: query
  })
}
/**
 *审核机构
 */
export function clubAudit(query) {
  return request({
    url: '/user/cmUserOrganize/audit',
    method: 'get',
    params: query
  })
}
/**
 *上线机构
 */
export function saveAddClubUser(query) {
  return request({
    url: '/user/cmUserOrganize/saveAddClubUser',
    method: 'get',
    params: query
  })
}
/**
 *机构列表
 */
export function getClubList(query) {
  return request({
    url: '/user/cmUserOrganize/clubList',
    method: 'get',
    params: query
  })
}
/**
 *机构详情
 */
export function getClubDetail(id) {
  return request({
    url: '/user/cmUserOrganize/clubDetail/' + id,
    method: 'get'
  })
}
/**
 *保存并生成邀请码
 */
export function createOperator(data) {
  return request({
    url: '/user/cmOperationUser/save',
    method: 'post',
    data
  })
}
/**
 *保存运营
 */
export function preservOperator(data) {
  return request({
    url: '/user/cmOperationUser/save',
    method: 'post',
    data
  })
}
/**
 *上线下线
 */
export function updateStatus(query) {
  return request({
    url: '/user/cmUserOrganize/switchLine',
    method: 'get',
    params: query
  })
}
/**
 *****************运营人员列表************
 */
/**
 *运营人员列表
 */
export function getOperatorList(query) {
  return request({
    url: '/user/cmOperationUser/list',
    method: 'get',
    params: query
  })
}
/**
 *更新邀请码&&生成邀请码
 */
export function updateOperatorCode(query) {
  return request({
    url: '/user/cmOperationUser/updateInvitationCode',
    method: 'get',
    params: query
  })
}
/**
 *解绑
 */
export function unbindOperator(query) {
  return request({
    url: '/user/cmOperationUser/untiedOperationUser',
    method: 'get',
    params: query
  })
}

