import request from '@/utils/request'

// 查询应用列表
export function listApp(query) {
  return request({
    url: '/VRdemo/app/list',
    method: 'get',
    params: query
  })
}

// 查询应用详细
export function getApp(appId) {
  return request({
    url: '/VRdemo/app/' + appId,
    method: 'get'
  })
}

// 新增应用
export function addApp(data) {
  return request({
    url: '/VRdemo/app',
    method: 'post',
    data: data
  })
}

// 修改应用
export function updateApp(data) {
  return request({
    url: '/VRdemo/app',
    method: 'put',
    data: data
  })
}
//修改应用状态
export function updateAppstatus(appId, status) {
  const data = {
    appId,
    status
  }
  return request({
    url: '/VRdemo/app/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除应用
export function delApp(appId) {
  return request({
    url: '/VRdemo/app/' + appId,
    method: 'delete'
  })
}
//   导出数据
export function exportApp(data){
  return request({
        url:'/excel/export/app',
        method:'get',
        responseType:'blob',
        data:data
      }

  )
}
