import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询行政区划信息列表
 * @param query
 * @returns {*}
 */
export const adcdList = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/adcd/list',
        method: 'get',
        params: query
    });
};
/**
 * 查询行政区划信息列表 传父级编码查询
 * @param query
 * @returns {*}
 */
export const listChildrenByCode = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/adcd/listChildrenByCode',
        method: 'get',
        params: query
    });
};
/**
 * 获取行政区划信息详细信息
 * @param query
 * @returns {*}
 */
export const adcdInfo = (id?: any): AxiosPromise<any> => {
    return request({
        url: `/adcd/getInfo/${id}`,
        method: 'get'
    });
};
/**
 * 获取行政区划信息详细信息
 * @param query
 * @returns {*}
 */
export const getAdcdByCode = (code?: any): AxiosPromise<any> => {
    return request({
        url: `/adcd/getByCode/${code}`,
        method: 'get'
    });
};
