const request = uni.$u.http

export async function search(params) {
  return request.get(
    'cases/search',
    { params }
  )
}

export async function detail(id) {
  return request.get(
    `cases/${id}/detail`
  )
}

export async function viewer(id) {
  return request.post(
    `cases/${id}/viewer`
  )
}

export default {
  search,
  detail,
  viewer
}
