import request from '@/utils/request'

// 获取特性分类基本信息
export function getFeaturesList(data) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify',
    method: 'get',
    params: data
  })
}

//新建特性分类管理
export function createFeatures(data) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify/manager',
    method: 'post',
    data
  })
}

//更新特性分类管理
export function updateFeatures(data) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify',
    method: 'put',
    data
  })
}

//获取特性分类详细信息
export function getFeaturesInfo(featureClassifyId) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify/' + featureClassifyId,
    method: 'get'
  })
}

//更新特性分类详细信息
export function putFeaturesInfo(data) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify/detail',
    method: 'put',
    data
  })
}

//上传图片
export function postUploadFile(data) {
  return request({
    url: request.apiModule.rdfm + '/uploadFile/uploadFile',
    method: 'upload',
    data
  })
}

//删除
export function deleteFeaturesInfo(id) {
  return request({
    url: request.apiModule.rpfm + '/featureClassify/detail',
    method: 'delete',
    data: { id: id }
  })
}
