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 addSupplier(data) {
  return request({
    url: '/shop/save',
    method: 'post',
    data
  })
}

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