/**
 * 到访策略接口
 */
import request from '@/utils/request'

// 策略查询
export function getStrategyList(params) {
  return request({
    url: 'strategy/listPage',
    method: 'get',
    params
  })
}

// 策略查询,不分页
export function getStrategyListNo(params) {
  return request({
    url: 'strategy/list',
    method: 'get',
    params
  })
}

// 策略详情,不分页
export function getStrategyDetail(id) {
  return request({
    url: 'strategy/detail/' + id,
    method: 'get'
  })
}

// 策略类别
export function getStrategyType(params) {
  return request({
    url: 'dict/code/strategyType',
    method: 'get',
    params
  })
}
// 策略周期
export function getStrategyPeriod(params) {
  return request({
    url: 'dict/code/strategyPeriod',
    method: 'get',
    params
  })
}
// 策略周期
export function getWeekList(params) {
  return request({
    url: 'dict/code/week',
    method: 'get',
    params
  })
}

// 添加策略
export function addStrategy(params) {
  return request({
    url: 'strategy/add',
    method: 'post',
    params
  })
}
// 修改策略
export function updateStrategy(params) {
  return request({
    url: 'strategy/update',
    method: 'post',
    params
  })
}
// 删除策略
export function delStrategy(id) {
  return request({
    url: 'strategy/delete',
    method: 'post',
    params: {
      strategyId: id
    }
  })
}
