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

export default {
    list: {
        url: `${config.API_URL}/kefu/list`,
        name: "客服列表",
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    save: {
        url: `${config.API_URL}/kefu/save`,
        name: "客服添加/保存",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    },
    del: {
        url: `${config.API_URL}/kefu/del`,
        name: "客服删除",
        delete: async function (id) {
            return await http.delete(`${this.url}/${id}`);
        }
    },
    setStatus: {
        url: `${config.API_URL}/kefu/set_status`,
        name: "客服状态设置",
        get: async function (id, status) {
            return await http.get(`${this.url}/${id}/${status}`);
        }
    }
};
