import request from '/@/utils/request';

export function dutyApi() {
    return {
        // v1
        getDutyList: (data: any) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/position/page/list`,
                method: 'post',
                data: data
            });
        },
        addDuty: (data: any) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/position/add`,
                method: 'post',
                data: data
            });
        },
        modDuty: (data: any) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/position/mod`,
                method: 'post',
                data: data
            });
        },
        delDuty: (data: any) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/position/del`,
                method: 'post',
                data: data
            });
        },
        getAllList: (data: any) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/position/list`,
                method: 'post',
                data: data
            });
        }
        // getAllUser: () => {
        //     return request({
        //         url: import.meta.env.VITE_API_URL + `/account/list`,
        //         method: 'get'
        //     });
        // }
    };
}
