import axios from 'axios'

let qs = require('qs');
export function fetch(url,options) {
  return new Promise((resolve, reject) => {
    axios.post(url,options).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err);
    });
  })
}
export function fetchqs(url,options) {
  return new Promise((resolve, reject) => {
    axios.post(url,qs.stringify(options)).then(res => {
      resolve(res);
    }).catch(err => {
      reject(err);
    });
  })
}

