import request from '@/utils/request'

// 获取ABtest列表
export function abtestList (params) {
  return request({
    url: '/abtest/test-info/page',
    method: 'get',
    params
  })
}

// 新增abtest数据
export function createAbtest (params) {
  return request({
    url: '/abtest/test-info/create',
    method: 'post',
    data:params
  })
}

// 删除abtest数据
export function removeAbtest (params) {
  return request({
    url: '/abtest/test-info/delete',
    method: 'delete',
    params
  })
}

// 修改abtest数据
export function editAbtest (params) {
  return request({
    url: '/abtest/test-info/update',
    method: 'put',
    data:params
  })
}


// 获取二级渠道
export function secondChannel (params) {
  return request({
    url: '/channel/info/listChannels',
    method: 'get',
    params
  })
}

// 获取abtest类型列表
export function typeListApi (params) {
  return request({
    url: '/abtest/type-dict/page',
    method: 'get',
    params
  })
}


// ab测试  测试数据
export function testData (params) {
  return request({
    url: '/abtest/test-info/orderdata',
    method: 'get',
    params
  })
}
