import { axios } from '@/utils/request'

/* 商品分类 */

// 列表
export const getSellerList = (params) => {
  const url = `seller/query/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

// 启用禁用
export const changeSellerStatus = (params) => {
  const url = `seller/enable/${params.id}/${params.flag}`
  return axios({
    url: url,
    data: params,
    method: 'get'
  })
}

// 查看编辑
export const SellerDetails = (params) => {
  const url = `seller/findById/${params.id}`
  return axios({
    url: url,
    data: params,
    method: 'get'
  })
}

// 编辑/保存
export const saveSeller = (params) => {
  const url = `seller/save`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

// 获取网点小程序码
export const sellerQrCode = params => {
  const url = `seller/qrCode/${params.officialPartnerNo}`
  return axios.request({
    url: url,
    method: 'get'
  })
}
