import request from '@/utils/request'

// 查询apk需要对应升级的日志列表
export function listLog(query) {
  return request({
    url: '/laboratory/apkfile/list',
    method: 'get',
    params: query
  })
}

// 查询apk需要对应升级的日志详细
export function getLog(id) {
  return request({
    url: '/laboratory/apkfile/' + id,
    method: 'get'
  })
}

// 新增apk需要对应升级的日志
export function addLog(data) {
  return request({
    url: '/laboratory/apkfile',
    method: 'post',
    data: data
  })
}

// 修改apk需要对应升级的日志
export function updateLog(data) {
  return request({
    url: '/laboratory/apkfile',
    method: 'put',
    data: data
  })
}

// 删除apk需要对应升级的日志
export function delLog(id) {
  return request({
    url: '/laboratory/apkfile/' + id,
    method: 'delete'
  })
}

// 查询错题本列表
export function getApkUploadList(query) {
  return request({
    url: '/laboratory/apkfile/getApkUploadList',
    method: 'get',
    params: query
  })
}

// 新增apk需要对应升级的日志
export function apkFileAddApkLog(data) {
  return request({
    url: '/laboratory/apkfile/addApkLog',
    method: 'post',
    data: data
  })
}

// 修改apk需要对应升级的日志
export function updateApkLog(data) {
  return request({
    url: '/laboratory/apkfile/updateApkLog',
    method: 'put',
    data: data
  })
}

// 获取APK列表http://192.168.1.9:8080/laboratory/apkfile/getApkUploadListByLimit?pageNum=1&pageSize = 20
export function getApkUploadListByLimit(query) {
  return request({
    url: '/laboratory/apkfile/getApkUploadListByLimit',
    method: 'get',
    params: query
  })
}

//新增apk
export function addApkUpload(query) {
  return request({
    url: '/laboratory/apkfile/addApkUpload',
    method: 'post',
    params: query
  })
}
// 获取APK列表------------------------------------------------------------
export function apkUploadList(query) {
  return request({
    url: '/laboratory/apkfile/apkUploadList',
    method: 'get',
    params: query
  })
}
export function apkUploadDelete(query) {
  return request({
    url: '/laboratory/apkfile/apkupload/' + query,
    method: 'delete'
  })
}

//编辑apk
export function editApkList(query) {
  return request({
    url: '/laboratory/apkfile/editApk',
    method: 'post',
    params: query
  })
}
