import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取分组列表
export function getGroupList(params) {
  return request({
    url: '/marketing/group/list',
    method: 'get',
    params
  })
}

// 添加分组
export function addGroup(params) {
  return request({
    url: '/marketing/group/add',
    method: 'post',
    params
  })
}

// 修改分组
export function editGroup(params) {
  return request({
    url: '/marketing/group/update',
    method: 'post',
    params
  })
}

// 删除分组
export function deleteGroup(params) {
  return request({
    url: '/marketing/group/delete',
    method: 'post',
    params
  })
}

// 获取素材列表
export function getMaterialList(params) {
  return request({
    url: '/marketing/materials/page',
    method: 'get',
    params
  })
}

// 添加素材
export function addMaterial(params) {
  return request({
    url: '/marketing/materials/add',
    method: 'post',
    data: params
  })
}

// 编辑素材
export function editMaterial(params) {
  return request({
    url: '/marketing/materials/update',
    method: 'post',
    data: params
  })
}

// 删除素材
export function deleteMaterial(params) {
  return request({
    url: '/marketing/materials/deleteById',
    method: 'post',
    params
  })
}

// 移组
export function moveGroup(params) {
  return request({
    url: '/marketing/materials/moveGroup',
    method: 'post',
    params
  })
}

// 获取素材详情
export function getMaterialDetail(params) {
  return request({
    url: '/marketing/materials/getUpdateDetailById',
    method: 'get',
    params
  })
}

// 获取标签列表
export function getTagList(params) {
  return request({
    url: '/tag/group/list',
    method: 'get',
    params
  })
}

// 获取动态素材列表
export function getDynamicList(params) {
  return request({
    url: '/dynamic/materials/page',
    method: 'get',
    params
  })
}

// 获取动态素材详情
export function getDynamicDetail(params) {
  return request({
    url: '/dynamic/materials/details',
    method: 'get',
    params
  })
}

// 获取部门树
export function getDepartmentTree(params) {
  return request({
    url: '/admin/websit/tree',
    method: 'get',
    params
  })
}

// 成员列表
export function getStaffList(params) {
  return request({
    url: '/wechat/enterprise/list',
    method: 'get',
    params
  })
}

// 个人sop-新增规则
export function addRules(params) {
  return request({
    url: '/sopRule/add',
    method: 'post',
    data:params
  })
}

// 个人sop-list
export function getSopList(params) {
  return request({
    url: '/sopRule/list',
    method: 'get',
    params
  })
}

// 个人sop-详情
export function getSopDetal(params) {
  return request({
    url: '/sopRule/detail',
    method: 'get',
    params
  })
}

// 个人sop-任务详情
export function getSopRuleDetal(params) {
  return request({
    url: '/sopRule/detailTask',
    method: 'get',
    params
  })
}

// 个人sop-任务统计
export function getSopTaskCount(params) {
  return request({
    url: '/sopRule/taskCount',
    method: 'get',
    params
  })
}

// 个人sop-客户列表
export function getSopTaskList(params) {
  return request({
    url: '/sopRule/taskList',
    method: 'get',
    params
  })
}

// 个人sop-删除规则
export function delSopRule(params) {
  return request({
    url: '/sopRule/delete',
    method: 'post',
    params
  })
}

// 个人sop-修改规则
export function editSopRule(params) {
  return request({
    url: '/sopRule/edit',
    method: 'post',
    data:params
  })
}

// 个人sop-修改任务
export function editSopTask(params) {
  return request({
    url: '/sopRule/editPushTask',
    method: 'post',
    data:params
  })
}

// 个人sop-删除任务
export function delSopTask(params) {
  return request({
    url: '/sopRule/deleteTask',
    method: 'post',
    params
  })
}

// 个人sop-新增客服
export function addKeFu(params) {
  return request({
    url: '/sopRule/addKeFu',
    method: 'post',
    data:params
  })
}

