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

export default {
    brokerage: {
        list: {
            url: `${config.API_URL}/finance/brokerage/list`,
            name: "佣金明细",
            get: async function (params = {}) {
                return await http.get(this.url, params);
            }
        }
    },
    extract: {
        list: {
            url: `${config.API_URL}/finance/extract/list`,
            name: "用户提现",
            get: async function (params = {}) {
                return await http.get(this.url, params);
            }
        },
        agree: {
            url: `${config.API_URL}/finance/extract/adopt`,
            name: "用户提现同意",
            post: async function (id, data = {}) {
                return await http.post(`${this.url}/${id}`, data);
            }
        },
        refuse: {
            url: `${config.API_URL}/finance/extract/refuse`,
            name: "用户提现拒绝",
            post: async function (id, data = {}) {
                return await http.post(`${this.url}/${id}`, data);
            }
        }
    }
};
