import request from '@/utils/request'

// 查询衣服质地列表
export function listTexture(query) {
  return request({
    url: '/mapi/cloth/texture/list',
    method: 'get',
    params: query
  })
}

// 查询衣服质地详细
export function getTexture(id) {
  return request({
    url: '/mapi/cloth/texture/' + id,
    method: 'get'
  })
}

// 新增衣服质地
export function addTexture(data) {
  return request({
    url: '/mapi/cloth/texture',
    method: 'post',
    data: data
  })
}

// 修改衣服质地
export function updateTexture(data) {
  return request({
    url: '/mapi/cloth/texture',
    method: 'put',
    data: data
  })
}

// 删除衣服质地
export function delTexture(id) {
  return request({
    url: '/mapi/cloth/texture/' + id,
    method: 'delete'
  })
}


// 修改衣服质地状态
export function updateTextureStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/cloth/texture/updateStatus',
    method: 'post',
    data: data
  })
}
