export default function(data, delRequest){
  window.setLoading && window.setLoading(false);
  return new Promise((resolve, reject) => {
    if (data) {
      if (data.dataList || data.dataList === null){
        resolve(data.dataList);
      } else if (data.result || data.result === null){
        resolve(data.result);
      }else if (data == 'TypeError: Failed to fetch'){
        reject(data);
      }else{
        resolve(data);
      }
      
    } else {
        reject(data);
    }
  });
}
