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

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