import { get, upload } from '../http/http'

const prefix = "dawn/api/v1/"

const apiBase = {
  getAssignStatusOptions() {
    return get(prefix + "assignment-status-select")
  },
  getChargerTypeOptions() {
    return get(prefix + "charger-type-select")
  },
  getDataStatusOptions() {
    return get(prefix + "data-status-select")
  },
  getAuditStatusOptions() {
    return get(prefix + "audit-status-select")
  },
  getUserGroupOptions(groupType) {
    return get(prefix + "group-select", {groupType: groupType})
  },
  getUserTypeOptions() {
    return get(prefix + "user-type-select")
  },
  /**
   * 获取用户列表(模糊查询)
   * @param {Object} data {email}
   */
  getUserOptions(data) {
    return get(prefix + "user-select", data)
  },
  getCountryList() {
    return get(prefix + "country-select")
  },
  getProviderList() {
    return get(prefix + "service-provider-select")
  },
  getPaymentMethodList() {
    return get(prefix + "payment-method-select")
  },
  getPaymentGatewayList() {
    return get(prefix + "payment-gateway-select")
  },
  getParkingTypeList() {
    return get(prefix + "parking-type-select")
  },
  uploadImage(form) {
    return upload(prefix + 'upload/picture', form)
  }
}

export default apiBase;