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

export default {
    list: {
        url: `${config.API_URL}/goods/list`,
        name: "-",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    qrcode: {
        url: `${config.API_URL}/goods/qrcode`,
        name: "-",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    category: {
        url: `${config.API_URL}/category/list`,
        name: "-",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    detail: {
        url: `${config.API_URL}/goods/detail`,
        name: "-",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    type: {
        url: `${config.API_URL}/goods/type`,
        name: "-",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    save: {
        url: `${config.API_URL}/goods/save`,
        name: "-",
        post: async function (params) {
            return await http.post(this.url, params);
        },
    },
    template: {
        url: `${config.API_URL}/goods/template`,
        name: "-",
        post: async function (params) {
            return await http.post(this.url, params);
        },
    },
    off: {
        url: `${config.API_URL}/goods/off`,
        name: "-",
        post: async function (params) {
            return await http.post(this.url, params);
        },
    },
    batch: {
        url: `${config.API_URL}/goods/batch`,
        name: "-",
        post: async function (params) {
            return await http.post(this.url, params);
        },
    },
}