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

// 列表查询
export const getList = (params) => {
  const url = `goldEx/query/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 查兑换列表  不分页
export const goldExListQuery = (params) => {
  return axios.request({
    url: `/goldEx/queryList`,
    method: 'post',
    data: params
  })
}
// 确认保存
export const saveExchangeSetting = (params) => {
  const url = `goldEx/save`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

// 查详情
export const viewExchangeSetting = (params) => {
  const url = `goldEx/findById/${params.id}`
  return axios({
    url: url,
    data: {},
    method: 'get'
  })
}

// 删除
export const deleteExchangeSetting = (params) => {
  const url = `goldEx/delete/${params.id}`
  return axios({
    url: url,
    data: {},
    method: 'get'
  })
}
