export default function(data, delRequest){
  window.setLoading && window.setLoading(false);
  return new Promise((resolve, reject) => {
    if (data) {
      if (data.dataList || data.dataList === null){
        if(data.result==='SUCCESS'){
          resolve(data.dataList);
        }else{
          //resolve(data.result);
          resolve(data);
        }
      } else if (data.result || data.result === null){
        resolve(data.result);
      }else{
        resolve(data);
      }
    } else {
      if (data) {
        reject(data.message);
      } else {
        reject(data);
      }
    }
  });
}
