/*定时任务Api*/
import request from '/@/utils/request';

/**
 * 公共参数
 * @method getPki 获取后端公共密钥
 * @method getcaptcha 获取后端公共密钥
 */
export function regularApi() {
    return {
        indexApi: (params?: object) => {
            return request({
                url: '/cron/task',
                method: 'get',
                params,
            });
        },
        putApi: (params?: object) => {
            return request({
                url: '/cron/task/edit',
                method: 'post',
                params,
            });
        },
        addApi: (data?: object) => {
            return request({
                url: '/cron/task',
                method: 'post',
                data,
            });
        },
        delApi: (params?: object) => {
            return request({
                url: '/cron/task',
                method: 'DELETE',
                params,
            });
        },
        standApi: (params?: object) => {
            return request({
                url: '/cron/task/execute',
                method: 'POST',
                params,
            });
        },

    };
}
