import config from "@/config";
import http from "@/utils/request";

export default {
    list: {
        url: `${config.API_URL}/category/list`,
        name: "-",
        get: async function (data = {}) {
            return await http.get(this.url, data);
        },
    },
    save: {
        url: `${config.API_URL}/category/save`,
        name: "-",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        },
    },
    edit: {
        url: `${config.API_URL}/category/edit`,
        name: "-",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        },
    },
    batch: {
        url: `${config.API_URL}/category/batch`,
        name: "-",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        },
    },
    sync: {
        url: `${config.API_URL}/category/sync`,
        name: "-",
        get: async function (data = {}) {
            return await http.get(this.url, data);
        },
    },
    del: {
        url: `${config.API_URL}/category/del`,
        name: "-",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        },
    },
}