import request from './request'

// 也可直接用这两个
export function httpGet(url, params) {
  return new Promise((resolve, reject)=>{
    request.get(url, params).then((result)=>{
      resolve(result)
    }).catch(err=>{
      reject(err)
    });
  });
}

export function httpPost(url, params) {
  return new Promise((resolve, reject)=>{
    request.post(url, params).then((result)=>{
      resolve(result)
    }).catch(err=>{
      reject(err)
    });
  });
}
