import request from '@/utils/request'
//云库管理

// 新增/编辑
export function add(data) {
  return request({
    url: '/web/cloud/resources',
    method: 'post',
    data: data
  })
}
// 新增/编辑
export function update(data) {
  return request({
    url: '/web/cloud/resources',
    method: 'put',
    data: data
  })
}
// 详情
export function getInfo(resourcesId) {
  return request({
    url: '/web/cloud/resources/'+resourcesId,
    method: 'get',
  })
}
// 删除
export function remove(resourcesId) {
  return request({
    url: '/web/cloud/resources/'+resourcesId,
    method: 'delete',
  })
}
// 列表
export function list(params) {
  return request({
    url: '/web/cloud/resources/list',
    method: 'get',
     params: params
  })
}
// 导出
export function exportList() {
  return request({
    url: '/web/cloud/resources/export',
    method: 'get',
  })
}
//新增云库
export function addCloudResource(data) {
  return request({
    url: '/web/cloud/resources/addCloudResource',
    method: 'post',
    data:data
  })
}
//删除云库
export function deleteCloudResource(resourcesIds) {
  return request({
    url: '/web/cloud/resources/deleteCloudResource',
    method: 'delete',
    params: {
    	resourcesIds
    }
  })
}
//云库详情
export function getCloudResourceDetail( params) {
  return request({
    url: '/web/cloud/resources/getCloudResourceDetail',
    method: 'get',
    params:  params
  })
}
//云库列表
export function getCloudResources(params) {
  return request({
    url: '/web/cloud/resources/getCloudResources',
    method: 'get',
     params: params
  })
}
//云库修改
export function modifyCloudResource(data) {
  return request({
    url: '/web/cloud/resources/modifyCloudResource',
    method: 'put',
    data:data
  })
}
// 下载到个人资源库
export function downToPersonResourse(params) {
  return request({
    url: '/web/cloud/resources/downToPersonResourse',
    method: 'post',
     params: params
  })
}
// 下载到校本库
export function downToSchoolResourse(params) {
  return request({
    url: '/web/cloud/resources/downToSchoolResourse',
    method: 'post',
     params: params
  })
}


// 获取视频点播信息
export function getVideoPlayAuth(params) {
  return request({
    url: '/common/vod/getVideoPlayAuth',
    method: 'get',
    params: params
  })
}
