import { getFetch, postFetch } from './http';

// 会员总览数据
export const memberCount = (params) => postFetch('/api-report/data-main-member-count?requestProject=report', params);
// 昨日 今日 本月 上月会员率
export const memberPercent = (params) => postFetch('http://gicdev.demogic.com/api-report/data-statistics-percent?requestProject=report', params);

// 日/月 销售额 指标
export const dataOrMonth = (params) => getFetch('http://gicdev.demogic.com/api-report/date-or-month-sales?requestProject=report', params);

// 日达成图表
export const daySale = () => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis-day-sale?requestProject=report');
// 月达成图表
export const monthSale = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);
// 销售额 今日单效数据
export const todaySales = () => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis?requestProject=report');
// 当日 隔日退货率 
export const todayreFunds= () => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis-refunds?requestProject=report');

// 销售分析
export const memberSalesAnalysis = (params) => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis?requestProject=report', params);

// 销售分析 销售占比 成交人数占比
export const memeberSalesMemberRation = (params) => getFetch('http://gicdev.demogic.com/api-report/member-ratio?requestProject=report', params);


// 总览 营销数据 积分商城 门店活动 微信图文数据 卡券数据
// 积分商城
export const mallData = () => postFetch('/api-report/data-get-integral-mall-data-for-index?requestProject=report');
// 门店活动
export const activityData = () => postFetch('http://gicdev.demogic.com/api-report/data-main-activity?requestProject=report');
// 微信图文数据
export const wechatData = () => postFetch('http://gicdev.demogic.com/api-report/data-main-wechat-report?requestProject=report');
// 卡券数据
export const carduseData = () => postFetch('http://gicdev.demogic.com/api-report/data-main-cardused?requestProject=report');
// 卡券领取
export const cardGet = () => postFetch('http://gicdev.demogic.com/api-report/data-main-card-get?requestProject=report');

// 门店概况
export const clerkCount = () => postFetch('http://gicdev.demogic.com/api-report/data-main-store-clerk-count?requestProject=report');
// 成员管理
export const storeClerk = () => postFetch('http://gicdev.demogic.com/api-report/data-main-store-clerk?requestProject=report');
// 门店评价 
export const evaluate = () => postFetch('http://gicdev.demogic.com/api-report/data-main-evaluate?requestProject=report');
// 会员生动化管理
export const vividSearch = () => postFetch('http://gicdev.demogic.com/api-report/data-member-vivid-search-for-index?requestProject=report');
// 任务管理
export const telTask = () => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis-tel-task?requestProject=report');
// 指标管理 
export const perf = () => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis-perf?requestProject=report');
// 投诉与建议
export const problem = ()  => postFetch('http://gicdev.demogic.com/api-report/data-sales-analysis-problem?requestProject=report');

// 会员总览数据 新增会员 会员率图表
export const memberAllChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);

// 会员分析图表接口
// 会员画像年龄图表
export const memberAgeChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);
// 会员画像星座图表
export const memberStarChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);
// 会员画像出生年月图表
export const memberBorthChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);
// 会员画像性别图表
export const memberSexChart = () => getFetch('http://gicdev.demogic.com/api-report/statistics-gender?requestProject=report');
// 会员画像会员等级图表
export const memberGradeChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);

// 销售分析图表
export const salesAsChart = (params) => getFetch('http://gicdev.demogic.com/api-report/data-statistics-echarts?requestProject=report', params);