import request from '@/utils/request'

export function listTicket(query) {
  return request({
    url: '/ticket/list',
    method: 'get',
    params: query
  })
}

export function listTicketAll(query) {
  return request({
    url: '/ticket/listAll',
    method: 'get',
    params: query
  })
}

export function detail(query) {
  return request({
    url: '/ticket/detail',
    method: 'get',
    params: query
  })
}

export function selectTicketByMobile(query) {
  return request({
    url: '/ticket/selectTicketByMobile',
    method: 'get',
    params: query
  })
}

export function memo(data) {
  return request({
    url: 'ticket/memo',
    method: 'post',
    data
  })
}

export function completedTicket(data) {
  return request({
    url: 'ticket/completed',
    method: 'post',
    data
  })
}

export function reject(data) {
  return request({
    url: 'ticket/reject',
    method: 'post',
    data
  })
}

export function upgrade(data) {
  return request({
    url: 'ticket/upgrade',
    method: 'post',
    data
  })
}

export function reopen(data) {
  return request({
    url: 'ticket/reopen',
    method: 'post',
    data
  })
}
