// import request { , extend } from 'umi';
import request from 'umi-request';
// 请求列表
import { requestList } from '@/utils/params';

let headers = { 'Content-Type': 'application/json'}
function Body(values:any) { return {method: 'POST',body: JSON.stringify(values),headers:headers}}

// 列表
export const getRemoveList = async (playload:any) =>{
    // 改造获取页码
    console.log(playload)
    console.log('开始请求')
    let url = (requestList[playload.index])[0]
    return request(url, Body(playload.page))
    .then(function(response) {
        if(response.error_code == '0000'){
            return response.data
        }else{
            return false
        } 
    })
    .catch(function(error) { return false; }); 
}
