import request from '@/utils/request'
//校本资源库管理

// 新增/编辑
export function add(data) {
  return request({
    url: '/web/school/resources',
    method: 'post',
    data: data
  })
}
// 新增/编辑
export function update (data) {
  return request({
    url: '/web/school/resources/modifySchoolResourceInfo',
    method: 'put',
    data: data
  })
}
// 详情
export function getInfo(resourcesId) {
  return request({
    url: '/web/school/resources/getSchoolResourceInfo',
    method: 'get',
    params: {
    	resourcesId
    }
  })
}
// 删除
export function remove(resourcesId) {
  return request({
    url: '/web/school/resources/deleteSchoolResource?resourcesIds='+resourcesId,
    method: 'delete',

  })
}

// 列表
export function list(params) {
  return request({
    url: '/web/school/resources/getSchoolResources',
    method: 'get',
     params: params
  })
}
// 导出
export function exportList(params) {
  return request({
    url: '/web/school/resources/export',
    method: 'get',
    params: params
  })
}
//下载至个人库

export function downToPersonResourse(params) {
  return request({
    url: '/web/school/resources/downToPersonResourse' ,
    method: 'post',
    params: params
  })
}
// 上传致云库
export function upToCloudResourse(params) {
  return request({
    url: '/web/school/resources/upToCloudResourse' ,
    method: 'post',
    params: params
  })
}
