import request from '@/utils/request'

// 供应商列表
export function fetchSupplierList(params) {
  return request({
    url: '/shop/list',
    method: 'get',
    params
  })
}

// 供应商状态
export function supplierStatusChange(data) {
  return request({
    url: '/shop/update/status',
    method: 'post',
    data
  })
}

// 添加供应商
export function createSupplier(data) {
  return request({
    url: '/shop/save',
    method: 'post',
    data
  })
}

// 根据id获取供应商
export function getSupplierById(params) {
  return request({
    url: '/shop/form/data',
    method: 'get',
    params
  })
}

// 获取采美供应商列表
export function fetchCmSupplierList(params) {
  return request({
    url: '/shop/cm/list',
    method: 'get',
    params
  })
}

// 修改供应商联系人
export function updateSupplierLinkMan(data) {
  return request({
    url: '/shop/link/man/change',
    method: 'post',
    data
  })
}

// 修改供应商logo
export function updateSupplierLogo(data) {
  return request({
    url: '/shop/logo/change',
    method: 'post',
    data
  })
}

// 修改供应商logo
export function saveSupplierShopInfo(data) {
  return request({
    url: '/shop/info/save',
    method: 'post',
    data
  })
}

// 修改供应商logo
export function deleteSupplierShopInfo(data) {
  return request({
    url: '/shop/info/delete',
    method: 'post',
    data
  })
}
