import request from '../utils/request'

/**
 * 分页查询落地页配置列表
 */
export function getLoadPageConfList(params) {
  return request({
    url: '/api/load-page-conf/list',
    method: 'get',
    params
  })
}

/**
 * 获取落地页配置详情
 */
export function getLoadPageConfDetail(id) {
  return request({
    url: `/api/load-page-conf/${id}`,
    method: 'get'
  })
}

/**
 * 新增落地页配置
 */
export function addLoadPageConf(data) {
  return request({
    url: '/api/load-page-conf',
    method: 'post',
    data
  })
}

/**
 * 更新落地页配置
 */
export function updateLoadPageConf(data) {
  return request({
    url: '/api/load-page-conf',
    method: 'put',
    data
  })
}

/**
 * 删除落地页配置
 */
export function deleteLoadPageConf(id) {
  return request({
    url: `/api/load-page-conf/${id}`,
    method: 'delete'
  })
}

/**
 * 批量删除落地页配置
 */
export function batchDeleteLoadPageConf(ids) {
  return request({
    url: '/api/load-page-conf/batch',
    method: 'delete',
    data: ids
  })
}

/**
 * 获取所有落地页配置（下拉选择用）
 */
export function getAllLoadPageConf() {
  return request({
    url: '/api/load-page-conf/all',
    method: 'get'
  })
}
