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

const AddRetention = (_pageSize) => {
  return [
    {
      key: 578,
      condition_id: 1,
      name: '首日通过第一章(房间1)',
      date: '2022-07-31',
      count: 940,
      day_1_active: 0,
      day_2_active: 0,
      day_3_active: 0,
      day_4_active: 0,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
  ];
};

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