import createAxios from '@/utils/request'

export const dicDelete = (id: string) => {
    let form = new FormData()
    form.append('id', id)
    return createAxios({
        url: '/system-boot/dictTree/delete',
        method: 'DELETE',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: form
    })
}

export function dicAdd(data: any) {
    return createAxios({
        url: '/system-boot/dictTree/add',
        method: 'post',
        data: data
    })
}

export function dicUpdate(data: any) {
    return createAxios({
        url: '/system-boot/dictTree/update',
        method: 'put',
        data: data
    })
}