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

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