import request from '@/utils/request'

// 创建品牌
export function createProductBrank(data) {
  return request({
    url: '/ecw/product-brank/create',
    method: 'post',
    data: data
  })
}

// 更新品牌
export function changeFeeModel(data) {
  return request({
    url: '/ecw/product-brank/changeFeeMode',
    method: 'put',
    data: data
  })
}

// 删除品牌
export function deleteProductBrank(id) {
  return request({
    url: '/ecw/product-brank/delete?id=' + id,
    method: 'delete'
  })
}

// 获得品牌
export function getProductBrank(id) {
  return request({
    url: '/ecw/product-brank/get?id=' + id,
    method: 'get'
  })
}

// 获得品牌分页
export function getProductBrankPage(query) {
  return request({
    url: '/ecw/product-brank/page',
    method: 'get',
    params: query
  })
}

// 导出品牌 Excel
export function exportProductBrankExcel(query) {
  return request({
    url: '/ecw/product-brank/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 更新品牌
export function setUnauthCustomerFeeType(data) {
  return request({
    url: '/ecw/product-brank/setUnauthCustomerFeeType',
    method: 'put',
    data: data
  })
}

//
export function getFeeTypeByCustomerProduct(data){
  return request({
    url: '/ecw/product-brank/getFeeTypeByCustomerProduct',
    method: 'post',
    data
  })
}
