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

//  优惠活动 列表  有分页
export const promoActiveList = (params) => {
  const url = `/promoActive/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  优惠活动 保存
export const promoActiveSave = (params) => {
  return axios({
    url: '/promoActive/save',
    data: params,
    method: 'post'
  })
}
//  优惠活动 删除
export const promoActiveDel = (params) => {
  const url = `/promoActive/delete/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  优惠活动 详情
export const promoActiveDetail = (params) => {
  const url = `/promoActive/findBySn/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  优惠活动 启禁用
export const promoActiveEnable = (params) => {
  const url = `/promoActive/enable/${params.sn}/${params.flag}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  优惠活动 详情
export const promoActiveDetailD = (params) => {
  const url = `/promoActive/findDetailBySn/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
