import request from '@/utils/request'

export default {
  // 为UI加载全部选项
  cascadeElementUI: () => {
    return request({
      url: 'api/administrative-area/cascade/element-ui',
      method: 'get'
    })
  },
  // 为UI加载默认选项和展示的名称
  cascadeUpElementUI: (areaCode) => {
    return request({
      url: 'api/administrative-area/cascade/up/element-ui',
      method: 'get',
      params: { areaCode }
    })
  },
  // code查询
  getByCode: (areaCode) => {
    return request({
      url: 'api/administrative-area/code',
      method: 'get',
      params: { areaCode }
    })
  }
}
