import request from '@/utils/request';
// 获取品牌列表
export function getBrandsInf(query) {
  return request({
    url: '/local/brands',
    method: 'get',
    params: query
  });
}

// 新增品牌
export function addBrandData(data) {
  return request({
    url: '/local/brands',
    method: 'post',
    data: data
  });
}

// 删除 品牌
export function delBrandData(data) {
  return request({
    url: '/local/brand/deleteBrand',
    method: 'post',
    data: data
  });
}

// 获取品牌详情
// export function  (id) {
//   return request({
//     url: '?id='+id,
//     method: 'get'
//   })
// }

export function getDetails(query) {
  return request({
    url: '/local/brandsInfo',
    method: 'get',
    params: query
  });
}

// 修改品牌信息
export function upBrand(data) {
  return request({
    url: '/local/upbrands',
    method: 'post',
    data: data
  });
}

// 上传图片 old
// export function upLoadImg (data) {
//   return request({
//     url: '/system/goods/uploadImg',
//     method: 'post',
//     data: data
//   });
// }
// new
export function upLoadImg (data) {
  return request({
    url: '/system/goodsNew/uploadImage',
    method: 'post',
    data: data
  });
}
