import axios from '../api'

export default {
  getBaseData(params) {
    return axios.get('/api/driver/baseData', JSON.stringify(params))
  },

  getDriverList(params) {
    return axios({
      method: "GET",
      url: '/api/driver/driverList',
      params: {
        ...params
      }
    })
  },

  getIndex(params) {
    return axios.post('/api/driver/index', JSON.stringify(params))
  },

  editDriver(params) {
    return axios.post('/api/driver/edit', JSON.stringify(params))
  },

  addDriver(params) {
    return axios.post('/api/driver/add', JSON.stringify(params))
  },

  dropDriver(params) {
    return axios({
      method: "POST",
      url: '/api/driver/drop',
      params: params
    })
  },

  getDetail(params) {
    return axios({
      method: "GET",
      url: '/api/driver/detail?id='+params.id,
      data: {}
    })
  }
}


