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

// 列表查询
export const getList = (params) => {
  const url = `deliveryTime/query/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 查投放时间规则列表  不分页
export const deliveryTimeListQuery = (params) => {
  return axios.request({
    url: `/deliveryTime/queryList`,
    method: 'post',
    data: params
  })
}
// 确认保存
export const saveTimeSetting = (params) => {
  const url = `deliveryTime/save`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

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

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