import createAxios from '/@/utils/axios'
import {actionUrl} from "/@/api/backend/routine/config";


export default {
    index: (url: string, data: anyObj = {}, action: string = 'index') => {
        return createAxios({
            url: url + action,
            method: 'get',
            params: data
        })
    },
    add: (url: string, data: anyObj = {}, action: string = 'add') => {
        return createAxios({
            url: url + action,
            method: 'post',
            data: data
        })
    },
    edit: (url: string, data: anyObj = {}, action: string = 'edit') => {
        return createAxios({
            url: url + action,
            method: 'post',
            data: data
        })
    },
    delete: (url: string, data: anyObj = {}, action: string = 'del') => {
        return createAxios({
            url: url + action,
            method: 'delete',
            data: data,
        })
    }

}
