// 采集器
import request from '@/utils/request'

// 建立网站  start------------------------------------------------------------
// 添加网站
export const addWeb = (data) => {
    return request({
        url: '/collector/addWeb',
        method: 'post',
        data
    })
}
// 获取并搜索网站
export const getWeb = (data) => {
    return request({
        url: '/collector/getWeb',
        method: 'post',
        data
    })
}
// 修改网站
export const updateWeb = (data) => {
    return request({
        url: '/collector/upWeb',
        method: 'post',
        data
    })
}
//删除网站
export const delWeb=(params)=>{
    return request({
        url: '/collector/delWeb',
        method: 'get',
        params
    })
}


// 规则列表  start-------------------------------------------------------------
// 添加规则任务
export const addRule = (data) => {
    return request({
        url: '/collector/addRule',
        method: 'post',
        data
    })
}
// 获取并搜索规则任务
export const getRule = (data) => {
    return request({
        url: '/collector/getRule',
        method: 'post',
        data
    })
}
// 获取某一个规则任务
export const getOneRule = (params) => {
    return request({
        url: '/collector/getOneRule',
        method: 'get',
        params
    })
}
// 修改采集规则
export const updateRule = (data) => {
    return request({
        url: '/collector/upRule',
        method: 'post',
        data
    })
}
// 删除规则任务
export const delRule = (params) => {
    return request({
        url: '/collector/delRule',
        method: 'get', 
        params
    })
}
// 开始采集
export const sendCrawler = (data) => {
    return request({
        url: '/collector/sendCrawler',
        method: 'post',
        data
    })
}


// 采集列表  start-------------------------------------------------------------
// 获取病搜索资讯
export const getInfo = (data) => {
    return request({
        url: '/collector/getInfo',
        method: 'post',
        data
    })
}
//获取某个资讯  
export const getOneInfo = (params) => {
    return request({
        url: '/collector/getOneInfo',
        method: 'get',
        params
    })
}
//修改资讯  
export const updateInfo = (data) => {
    return request({
        url: '/collector/upInfo',
        method: 'post',
        data
    })
}
//删除资讯 
export const delInfo = (params) => {
    return request({
        url: '/collector/delInfo',
        method: 'get',
        params
    })
}
//关联导航池  
export const addCatid = (data) => {
    return request({
        url: '/collector/addCatid',
        method: 'post',
        data
    })
}
// 导入文章
export const addArt = (params) => {
    return request({
        url: '/collector/addArt',
        method: 'get',
        params
    })
}
