import request from '@/utils/request'

// 查询工单主列表
export function listTicket(url) {
  return request({
	url,
    method: 'get',
  })
}

// 查询工单主详细
export function getTicket(id) {
  return request({
	url: '/ticket/' + id,
	method: 'get'
  })
}

export function uploadAvatar(data) {
  return request({
    url: '/system/user/profile/avatar',
	// url:'/common/upload',
    method: 'post',
    // header: { 'Content-Type': 'application/x-www-form-urlencoded' },
	header: { 'Content-Type': 'multipart/form-data' },
    data: JSON.stringify(data)
  })
}

// 修改工单
export function updateTicket(data) {
  return request({
    url: '/ticket',
    method: 'put',
    data: data
  })
}
