// useRequest配置pagination时。对参数格式有特殊要求，该方法将特殊格式转化为统一格式
const paginationWrapper = (service: any) => {
  return ({ current, pageSize }: { current: number; pageSize: number }, ...rest: any) => {
    rest[0].take = pageSize
    rest[0].skip = current
    return service(rest[0])
  }
}

export default paginationWrapper
