import { requests } from './index';
import config from '@/config';
const PREFIX = 'api-integral-mall/';

// 首页优惠券
export const getPageCardsList = (params) => requests(PREFIX + 'page-cards', params);

//更新库存
export const updateStockService = (params) => requests(PREFIX + 'update-stock', params);

//更新兑换所需积分
export const updateIntegralCostService = (params) => requests(PREFIX + 'update-integral-cost', params);

//更新兑换所需现金
export const updateCashCostService = (params) => requests(PREFIX + 'update-cash-cost', params);

//删除商品
export const deleteProService = (params) => requests(PREFIX + 'delete-pro', params);

//查看兑换记录
export const getPageExchangeLogsList = (params) => requests(PREFIX + 'page-exchange-logs', params);

//查询单个商品
export const getIntegralMallProInfo = (params) => requests(PREFIX + 'get-integral-mall-pro', params);

//基础数据-会员等级
export const getGradeList = (params) => requests(PREFIX + 'load-grade', params);

//创建修改积分商品
export const createIntegralProService = (params) => requests(PREFIX + 'create-integral-pro', params, true);



// 首页礼品列表
export const getPageGiftList = (params) => requests(PREFIX + 'page-gift', params);

// 基础数据-分类列表
export const getCategoryList = (params) => requests(PREFIX + 'load-category', params);



// 导出优惠券兑换记录
export const exportExchangeListExcel = config.api + PREFIX + 'download-exchange-list-execl';

// 导出代发货商品
export const exportOnlineListExcel = config.api + PREFIX + 'download-integral-online-excel';

// 查看物流
export const getLogisticsInfo = (params) => requests(PREFIX + 'list-logistics-traces', params);

// 基础数据-物流列表
export const getLogisticsList = (params) => requests(PREFIX + 'load-logisties', params);

// 订单发货，取消，修改物流
export const orderOptService = (params) => requests(PREFIX + 'order-opt', params);

// 首页待发货
export const getPageUndeliverList = (params) => requests(PREFIX + 'page-undeliver', params);

// 首页代发货数量
export const getNotSendCount = (params) => requests(PREFIX + 'get-not-send-count', params);

// 礼品设置热门商品
export const setHotStatusService = (params) => requests(PREFIX + 'update-hot-status', params);

// 新建礼品分类
export const createCategoryService = (params) => requests(PREFIX + 'create-gift-category', params);

// 删除礼品分类
export const delCategoryService = (params) => requests(PREFIX + 'del-gift-category', params);
