import { resultSuccess } from '../_util';

const PayPerClick = (_pageSize) => {
  return [
    {
      key: 1821,
      position_id: 1008,
      goods_id: 8,
      show_times: 0,
      click_times: 1,
      success_times: 0,
      show_users: 0,
      click_users: 1,
      success_users: 0,
      comment: '充值,商品id(8)',
    },
    {
      key: 1822,
      position_id: 1009,
      goods_id: 9,
      show_times: 0,
      click_times: 1,
      success_times: 0,
      show_users: 0,
      click_users: 1,
      success_users: 0,
      comment: '充值,商品id(9)',
    },
    {
      key: 1823,
      position_id: 1019,
      goods_id: 19,
      show_times: 0,
      click_times: 9,
      success_times: 31,
      show_users: 0,
      click_users: 9,
      success_users: 31,
      comment: '充值,商品id(19)',
    },
    {
      key: 1824,
      position_id: 1020,
      goods_id: 20,
      show_times: 0,
      click_times: 7,
      success_times: 28,
      show_users: 0,
      click_users: 7,
      success_users: 28,
      comment: '充值,商品id(20)',
    },
    {
      key: 1825,
      position_id: 2008,
      goods_id: 8,
      show_times: 0,
      click_times: 1,
      success_times: 0,
      show_users: 0,
      click_users: 1,
      success_users: 0,
      comment: '充值,商品id(8),双倍获取',
    },
    {
      key: 1826,
      position_id: 2012,
      goods_id: 12,
      show_times: 0,
      click_times: 1,
      success_times: 0,
      show_users: 0,
      click_users: 1,
      success_users: 0,
      comment: '充值,商品id(12),双倍获取',
    },
    {
      key: 1827,
      position_id: 191019,
      goods_id: 19,
      show_times: 0,
      click_times: 31,
      success_times: 0,
      show_users: 0,
      click_users: 31,
      success_users: 0,
      comment: '充值,商品id(19)',
    },
    {
      key: 1828,
      position_id: 201020,
      goods_id: 20,
      show_times: 0,
      click_times: 28,
      success_times: 0,
      show_users: 0,
      click_users: 28,
      success_users: 0,
      comment: '充值,商品id(20)',
    },
  ];
};

export default [
  {
    url: '/api/echarts/PayPerClick',
    timeout: 1,
    method: 'get',
    response: ({ query }) => {
      const { page = 1, pageSize = 10 } = query;
      const list = PayPerClick(Number(pageSize));
      return resultSuccess({
        page: Number(page),
        pageSize: Number(pageSize),
        pageCount: 1,
        list,
      });
    },
  },
];
