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

export default {
    list: {
        url: `${config.API_URL}/cutter/list`,
        name: "剪辑师列表",
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    applyList: {
        url: `${config.API_URL}/cutter/apply/list`,
        name: "剪辑师申请列表",
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    applyAgreed: {
        url: `${config.API_URL}/cutter/apply/agreed`,
        name: "剪辑师同意申请",
        post: async function (id, data = {}) {
            return await http.post(`${this.url}/${id}`, data);
        }
    },
    applyRefuse: {
        url: `${config.API_URL}/cutter/apply/refuse`,
        name: "剪辑师拒绝申请",
        post: async function (id, data = {}) {
            return await http.post(`${this.url}/${id}`, data);
        }
    },
    orderList: {
        url: `${config.API_URL}/cutter/order/list`,
        name: "剪辑订单列表",
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    orderInfo: {
        url: `${config.API_URL}/cutter/order/info`,
        name: "剪辑订单详情",
        get: async function (id) {
            return await http.get(`${this.url}/${id}`);
        }
    },
    orderAffirm: {
        url: `${config.API_URL}/cutter/order/affirm`,
        name: "剪辑订单通过",
        post: async function (id, data = {}) {
            return await http.post(`${this.url}/${id}`, data);
        }
    },
    orderReject: {
        url: `${config.API_URL}/cutter/order/reject`,
        name: "剪辑订单拒绝",
        post: async function (id, data = {}) {
            return await http.post(`${this.url}/${id}`, data);
        }
    },
    orderSettle: {
        url: `${config.API_URL}/cutter/order/settle`,
        name: "订单结算",
        post: async function (id, data = {}) {
            return await http.post(`${this.url}/${id}`, data);
        }
    },
    labelList: {
        url: `${config.API_URL}/cutter/label/list`,
        name: "标签列表",
        get: async function (type) {
            return await http.get(`${this.url}/${type}`);
        }
    },
    labelSave: {
        url: `${config.API_URL}/cutter/label/save`,
        name: "标签保存/编辑",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    },
    labelDel: {
        url: `${config.API_URL}/cutter/label/del`,
        name: "标签删除",
        delete: async function (id) {
            return await http.delete(`${this.url}/${id}`);
        }
    },
    labelInfo: {
        url: `${config.API_URL}/cutter/label/info`,
        name: "标签详情",
        get: async function (id) {
            return await http.get(`${this.url}/${id}`);
        }
    }
};
