import request from './request';
import { ElMessage } from 'element-ui'

const http = function (url, data) {
  return request({url, data})
    .then(response => {
      if (response.code === "1") {
        return response.data
      }
    })
    .catch(e => {
      console.log(e)
    })
}

export default http