
import axios from '../../utils/axios';
import { stringToUrl } from '@/common/js/utils';

// 获取优惠码列表
export function getdiscountCodeList(params) {
  return axios.post(`/SZWL-SERVER/tPromoCode/list`, params);
}
// 导出优惠码
export function discountCodeExport(params) {
  return axios.post(`/SZWL-SERVER/tPromoCode/exportList`, params, { responseType: 'blob' })
}
// 添加优惠码
export function addCode(params) {
  return axios.get(`/SZWL-SERVER/tPromoCode/add?${stringToUrl(params)}`);
}
// 批量删除优惠码
export function deleteCode(params) {
  return axios.post(`/SZWL-SERVER/tPromoCode/deletes`, params)
}