import request from "../utils/request.js";
import Method from "./Method.js";

const admin = {
    login: async (data) => {
        return request({
            url: '/admin/login/login',
            method: Method.POST,
            data: data,
        });
    },
    phoneLogin: async (data) => {
        return request({
            url: '/admin/login/mobileLogin',
            method: Method.POST,
            data: data,
        });
    },
    sendSms: async (mobile) => {
        return request({
            url: '/admin/login/sendSms',
            method: Method.POST,
            data: {mobile},
        });
    },
    getMenu: async () => {
        return request({
            url: '/admin/admin/menu',
            method: Method.POST,
        });
    },
    getTaskStatusList: async () => {
        return request({
            url: '/admin/task/getStatusList',
            method: Method.POST,
        });
    },
    getPlatform: async () => {
        return request({
            url: '/admin/platform/getList',
            method: Method.POST,
        });
    },
    getCheckStatusList: async () => {
        return request({
            url: '/admin/task/getCheckStatusList',
            method: Method.POST,
        });
    },
    getTaskList: async (data) => {
        return request({
            url: '/admin/task/getTaskList ',
            method: Method.POST,
            data: data,
        });
    },
    passTask: async (data) => {
        return request({
            url: '/admin/task/passTask',
            method: Method.POST,
            data: data,
        });
    },
    refuseTask: async (data) => {
        return request({
            url: '/admin/task/refuseTask',
            method: Method.POST,
            data: data,
        });
    },
    stopTask: async (id) => {
        return request({
            url: '/admin/task/stopTask',
            method: Method.POST,
            data: {id},
        });
    },
    getTaskDetail: async (id) => {
        return request({
            url: '/admin/task/getTaskInfo',
            method: Method.POST,
            data: {id},
        });
    },
    editTask: async (data) => {
        return request({
            url: '/admin/task/editTask',
            method: Method.POST,
            data: data,
        });
    },
    getStatusList: async () => {
        return request({
            url: '/admin/taskChildren/getStatusList',
            method: Method.POST,
        });
    },
    getSubCheckStatusList: async () => {
        return request({
            url: '/admin/taskChildren/getCheckStatusList',
            method: Method.POST,
        });
    },
    getTaskChildrenList: async (data) => {
        return request({
            url: '/admin/taskChildren/getTaskChildrenList',
            method: Method.POST,
            data: data
        });
    },
    getTaskChildrenInfo: async (id) => {
        return request({
            url: '/admin/taskChildren/getTaskChildrenInfo',
            method: Method.POST,
            data: {id}
        });
    },
    passTaskChildren: async (id) => {
        return request({
            url: '/admin/taskChildren/passTaskChildren',
            method: Method.POST,
            data: {id}
        });
    },
    refuseTaskChildren: async (data) => {
        return request({
            url: '/admin/taskChildren/refuseTaskChildren',
            method: Method.POST,
            data: data
        });
    },
    getStatusAttr: async () => {
        return request({
            url: '/admin/exchangeLog/getStatusAttr',
            method: Method.POST
        });
    },
    getPattenAttr: async () => {
        return request({
            url: '/admin/exchangeLog/getPattenAttr',
            method: Method.POST
        });
    },
    getTypeAttr: async () => {
        return request({
            url: '/admin/exchangeLog/getTypeAttr',
            method: Method.POST
        });
    },
    getExchangeLog: async (data) => {
        return request({
            url: '/admin/exchangeLog/getExchangeLog',
            method: Method.POST,
            data: data
        });
    },
    getInterventionList: async (data) => {
        return request({
            url: '/admin/intervention/getInterventionList',
            method: Method.POST,
            data: data
        });
    },
    getBusinessmoneylogPlatform: async () => {
        return request({
            url: '/admin/businessMoneyLog/getPlatform',
            method: Method.POST,
        });
    },
    getBusinessmoneylogPurpose: async () => {
        return request({
            url: '/admin/businessMoneyLog/getPurpose',
            method: Method.POST,
        });
    },
    getBusinessmoneylogList: async (data) => {
        return request({
            url: '/admin/businessMoneyLog/getList',
            method: Method.POST,
            data: data
        });
    },
    getUsermoneylogPlatform: async () => {
        return request({
            url: '/admin/userMoneyLog/getPlatform',
            method: Method.POST,
        });
    },
    getUsermoneylogPurpose: async () => {
        return request({
            url: '/admin/userMoneyLog/getPurpose',
            method: Method.POST,
        });
    },
    getUsermoneylogList: async (data) => {
        return request({
            url: '/admin/userMoneyLog/getList',
            method: Method.POST,
            data: data
        });
    },
    getWithdrawalPerson: async () => {
        return request({
            url: '/admin/withdrawal/getPerson',
            method: Method.POST,
        });
    },
    getWithdrawalPlatform: async () => {
        return request({
            url: '/admin/withdrawal/getPlatform',
            method: Method.POST,
        });
    },
    getWithdrawalPlatform2: async () => {
        const {data} = await request({
            url: '/admin/withdrawal/getPlatform',
            method: Method.POST,
        });
        data.shift();
        return {data};
    },
    getWithdrawalList: async (data) => {
        return request({
            url: '/admin/withdrawal/getList',
            method: Method.POST,
            data: data
        });
    },
    getWithdrawllogStatus: async (data) => {
        return request({
            url: '/admin/WithdrawalLog/getStatus',
            method: Method.POST,
            data: data
        });
    },
    getWithdrawllogList: async (data) => {
        return request({
            url: '/admin/WithdrawalLog/getList',
            method: Method.POST,
            data: data
        });
    },
    getBusinessList: async (data) => {
        return request({
            url: '/admin/business/getList',
            method: Method.POST,
            data: data
        });
    },
    getUserList: async (data) => {
        return request({
            url: '/admin/user/getList',
            method: Method.POST,
            data: data
        });
    },
    getAccountList: async (data) => {
        return request({
            url: '/admin/account/getList',
            method: Method.POST,
            data: data
        });
    },
    getTaskblockList: async (data) => {
        return request({
            url: '/admin/TaskBlock/getList',
            method: Method.POST,
            data: data
        });
    },
    getBarragelist: async (data) => {
        return request({
            url: '/admin/barrage/getlist',
            method: Method.POST,
            data: data
        });
    },
    addBarrage: async (data) => {
        return request({
            url: '/admin/barrage/add',
            method: Method.POST,
            data: data
        });
    },
    editBarrage: async (data) => {
        return request({
            url: '/admin/barrage/edit',
            method: Method.POST,
            data: data
        });
    },
    barrageWeigh: async (data) => {
        return request({
            url: '/admin/barrage/weigh',
            method: Method.POST,
            data: data
        });
    },
    barrageDel: async (data) => {
        return request({
            url: '/admin/barrage/del',
            method: Method.POST,
            data: data
        });
    },
    advDel: async (data) => {
        return request({
            url: '/admin/adv/del',
            method: Method.POST,
            data: data
        });
    },
    getNoticeList: async (data) => {
        return request({
            url: '/admin/notice/getList',
            method: Method.POST,
            data: data
        });
    },
    addNotice: async (data) => {
        return request({
            url: '/admin/notice/add',
            method: Method.POST,
            data: data
        });
    },
    editNotice: async (data) => {
        return request({
            url: '/admin/notice/edit',
            method: Method.POST,
            data: data
        });
    },
    delNotice: async (id) => {
        return request({
            url: '/admin/notice/del',
            method: Method.POST,
            data: {id}
        });
    },
    getNoticeType: async () => {
        return request({
            url: '/admin/notice/getType',
            method: Method.POST,
        });
    },
    setNoticeStatus: async (id) => {
        return request({
            url: '/admin/notice/status',
            method: Method.POST,
            data: {id}
        });
    },
    setNoticeTop: async (id) => {
        return request({
            url: '/admin/notice/top',
            method: Method.POST,
            data: {id}
        });
    },
    setTaskTop: async (id, type) => {
        return request({
            url: '/admin/task/setTaskTop',
            method: Method.POST,
            data: {id, type}
        });
    },
    setTaskWeigh: async (data) => {
        return request({
            url: '/admin/task/setTaskWeigh',
            method: Method.POST,
            data: data
        });
    },
    setNotcieWeigh: async (data) => {
        return request({
            url: '/admin/notice/weigh',
            method: Method.POST,
            data: data
        });
    },
    getADVType: async () => {
        return request({
            url: '/admin/adv/getType',
            method: Method.POST,
        });
    },
    addADV: async (data) => {
        return request({
            url: '/admin/adv/add',
            method: Method.POST,
            data: data
        });
    },
    editADV: async (data) => {
        return request({
            url: '/admin/adv/edit',
            method: Method.POST,
            data: data
        });
    },
    setADVStatus: async (id) => {
        return request({
            url: '/admin/adv/status',
            method: Method.POST,
            data: {id}
        });
    },
    setADVWeigh: async (data) => {
        return request({
            url: '/admin/adv/weigh',
            method: Method.POST,
            data: data
        });
    },
    delADV: async (id) => {
        return request({
            url: '/admin/adv/del',
            method: Method.POST,
            data: {id}
        });
    },
    getADVList: async (data) => {
        return request({
            url: '/admin/adv/getList',
            method: Method.POST,
            data: data
        });
    },
    getQRList: async (data) => {
        return request({
            url: '/admin/qrcode/getList',
            method: Method.POST,
            data: data
        });
    },
    editQRList: async (data) => {
        return request({
            url: '/admin/qrcode/edit',
            method: Method.POST,
            data: data
        });
    },
    getArticleCategoryList: async (data) => {
        return request({
            url: '/admin/articleCategory/getList',
            method: Method.POST,
            data: data
        });
    },
    getArticleCategoryList2: async (data) => {
        const res = await request({
            url: '/admin/articleCategory/getList',
            method: Method.POST,
            data: data
        });
        return {data: res.data.list};
    },
    addArticleCategory: async (data) => {
        return request({
            url: '/admin/articleCategory/add',
            method: Method.POST,
            data: data
        });
    },
    detailArticleCategory: async (data) => {
        return request({
            url: '/admin/articleCategory/detail',
            method: Method.POST,
            data: data
        });
    },
    editArticleCategory: async (data) => {
        return request({
            url: '/admin/articleCategory/edit',
            method: Method.POST,
            data: data
        });
    },
    delArticleCategory: async (id) => {
        return request({
            url: '/admin/articleCategory/del',
            method: Method.POST,
            data: {id}
        });
    },
    weighArticleCategory: async (data) => {
        return request({
            url: '/admin/articleCategory/weigh',
            method: Method.POST,
            data: data
        });
    },
    getArticleList: async (data) => {
        return request({
            url: '/admin/article/getList',
            method: Method.POST,
            data: data
        });
    },
    addArticle: async (data) => {
        return request({
            url: '/admin/article/add',
            method: Method.POST,
            data: data
        });
    },
    statusArticle: async (id) => {
        return request({
            url: '/admin/article/status',
            method: Method.POST,
            data: {id}
        });
    },
    topArticle: async (id) => {
        return request({
            url: '/admin/article/top',
            method: Method.POST,
            data: {id}
        });
    },
    weighArticle: async (data) => {
        return request({
            url: '/admin/article/weigh',
            method: Method.POST,
            data: data
        });
    },
    delArticle: async (id) => {
        return request({
            url: '/admin/article/del',
            method: Method.POST,
            data: {id}
        });
    },
    editArticle: async (data) => {
        return request({
            url: '/admin/article/edit',
            method: Method.POST,
            data: data
        });
    },
    typeArticle: async () => {
        return request({
            url: '/admin/article/getType',
            method: Method.POST,
        });
    },
    getSingleList: async (data) => {
        return request({
            url: '/admin/single/getList',
            method: Method.POST,
            data: data,
        });
    },
    addSingle: async (data) => {
        return request({
            url: '/admin/single/add',
            method: Method.POST,
            data: data,
        });
    },
    editSingle: async (data) => {
        return request({
            url: '/admin/single/edit',
            method: Method.POST,
            data: data,
        });
    },
    delSingle: async (id) => {
        return request({
            url: '/admin/single/del',
            method: Method.POST,
            data: {id},
        });
    },
    detailSingle: async (id) => {
        return request({
            url: '/admin/single/detail',
            method: Method.POST,
            data: {id},
        });
    },
    getWithdrawalInfo: async (id) => {
        return request({
            url: '/admin/Withdrawal/getInfo',
            method: Method.POST,
            data: {id},
        });
    },
    getWithdrawalSetRatio: async (data) => {
        return request({
            url: '/admin/Withdrawal/setRatio',
            method: Method.POST,
            data: data,
        });
    },
    passExchange: async (ids) => {
        return request({
            url: '/admin/ExchangeLog/passExchange',
            method: Method.POST,
            data: {ids},
        });
    },
    refuseExchange: async (ids) => {
        return request({
            url: '/admin/ExchangeLog/refuseExchange',
            method: Method.POST,
            data: {ids},
        });
    },
    businessDetail: async (id) => {
        return request({
            url: '/admin/business/detail',
            method: Method.POST,
            data: {id},
        });
    },
    businessEdit: async (data) => {
        return request({
            url: '/admin/business/edit',
            method: Method.POST,
            data: data,
        });
    },
    userDetail: async (id) => {
        return request({
            url: '/admin/user/detail',
            method: Method.POST,
            data: {id},
        });
    },
    userEdit: async (data) => {
        return request({
            url: '/admin/user/edit',
            method: Method.POST,
            data: data,
        });
    },
    userLevel: async (data) => {
        return request({
            url: '/admin/user/level',
            method: Method.POST,
            data: data,
        });
    },
    accept: async (id) => {
        return request({
            url: '/admin/account/accept',
            method: Method.POST,
            data: {id},
        });
    },
    refund: async (data) => {
        return request({
            url: '/admin/account/refund',
            method: Method.POST,
            data: data,
        });
    },
    getExchangeLogIntervention: async (data) => {
        return request({
            url: '/admin/Intervention/getExchangeLog',
            method: Method.POST,
            data: data,
        });
    },
    addIntervention: async (data) => {
        return request({
            url: '/admin/Intervention/addIntervention',
            method: Method.POST,
            data: data,
        });
    },
    addInterventionV2: async (data) => {
        return request({
            url: '/admin/Intervention/postIntervention',
            method: Method.POST,
            data: data,
        });
    },
    withdrawallogTranfer: async (data) => {
        return request({
            url: '/admin/withdrawalLog/tranfer',
            method: Method.POST,
            data: data,
        });
    },
    withdrawalLogAddRemark: async (data) => {
        return request({
            url: '/admin/withdrawalLog/addRemark',
            method: Method.POST,
            data: data,
        });
    },
    taskBlockCancel: async (data) => {
        return request({
            url: '/admin/TaskBlock/cancel',
            method: Method.POST,
            data: data,
        });
    },
    getTaskOrderList: async (data) => {
        return request({
            url: '/admin/Task/getTaskOrderList',
            method: Method.POST,
            data: data,
        });
    },
    getComplaintList: async (data) => {
        return request({
            url: '/admin/complaint/getList',
            method: Method.POST,
            data: data,
        });
    },
    editComplaintStatus: async (data) => {
        return request({
            url: '/admin/complaint/editStatus',
            method: Method.POST,
            data: data,
        });
    },
    overview: async (data) => {
        return request({
            url: '/admin/withdrawal/overview',
            method: Method.POST,
            data: data,
        });
    },
    addChildrenComment: async (data) => {
        return request({
            url: '/admin/TaskChildren/addChildrenComment',
            method: Method.POST,
            data: data,
        });
    },
    getChildrenComment: async (id) => {
        return request({
            url: '/admin/TaskChildren/getChildrenComment',
            method: Method.POST,
            data: {id},
        });
    },
    delChildrenComment: async (id) => {
        return request({
            url: '/admin/TaskChildren/delChildrenComment',
            method: Method.POST,
            data: {id},
        });
    },
    passChildrenMaterial: async (data) => {
        return request({
            url: '/admin/TaskChildren/passChildrenMaterial',
            method: Method.POST,
            data: data,
        });
    },
    getBackinfo: async (data) => {
        return request({
            url: '/admin/intervention/getBackinfo',
            method: Method.POST,
            data: data,
        });
    },
    checkSettlement: async (data) => {
        return request({
            url: '/admin/intervention/checkSettlement',
            method: Method.POST,
            data: data,
        });
    },
    settlement: async (data) => {
        return request({
            url: '/admin/intervention/settlement',
            method: Method.POST,
            data: data,
        });
    },
    editStatus: async (data) => {
        return request({
            url: '/admin/intervention/editStatus',
            method: Method.POST,
            data: data,
        });
    },
    stopTaskChildren: async (id) => {
        return request({
            url: '/admin/TaskChildren/stopTaskChildren',
            method: Method.POST,
            data: {id},
        });
    },
    plTaskChildren: async (ids) => {
        return request({
            url: '/admin/TaskChildren/plTaskChildren',
            method: Method.POST,
            data: {ids},
        });
    },
    tgAccountDetail: async (id) => {
        return request({
            url: '/admin/account/detail',
            method: Method.POST,
            data: {id},
        });
    },
    tgAccountEdit: async (data) => {
        return request({
            url: '/admin/account/edit',
            method: Method.POST,
            data: data,
        });
    },
    getInterventionTaskList: async (data) => {
        return request({
            url: '/admin/Intervention/getTaskList',
            method: Method.POST,
            data: data,
        });
    },
    interventionJsTask: async (data) => {
        return request({
            url: '/admin/Intervention/jsTask',
            method: Method.POST,
            data: data,
        });
    },
}

export default admin;
