import request from '@/utils/request'
import {params} from "svgo/plugins/prefixIds";

// 查询用户列表（公司的会员）
export function listUser(query) {
  return request({
    url: '/user/fsUser/list',
    method: 'post',
    data: query
  })
}

// 查询用户列表（销售的会员）
export function myListUser(query) {
  return request({
    url: '/user/fsUser/myList',
    method: 'post',
    data: query
  })
}

// 查询用户详细
export function getUser(userId) {
  return request({
    url: '/user/fsUser/' + userId,
    method: 'get'
  })
}

// 项目会员信息
export function getMemberUser(id) {
  return request({
    url: '/user/fsUser/member/' + id,
    method: 'get'
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/user/fsUser',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/user/fsUser',
    method: 'put',
    data: data
  })
}

// 修改用户
export function updateMemberUser(data) {
  return request({
    url: '/user/fsUser/member',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delUser(userId) {
  return request({
    url: '/user/fsUser/' + userId,
    method: 'delete'
  })
}

// 导出用户
export function exportUser(query) {
  return request({
    url: '/user/fsUser/export',
    method: 'post',
    data: query
  })
}

// 查询用户标签列表
export function listUserTags() {
  return request({
    url: '/system/tag/list',
    method: 'get'
  })
}

// 查询销售员工列表
export function listSalesStaff() {
  return request({
    url: '/system/user/company/list',
    method: 'get'
  })
}
// 移除小黑屋
export function auditUser(data) {
  return request({
    url: '/user/fsUser/auditUser',
    method: 'post',
    data: data
  })
}

// 获取企微重粉数据
export function getQwRepeatData(data){
  return request({
    url: '/qw/externalContact/qwRepeatData',
    method: 'post',
    data: data
  })
}

// 批量发送IM
export function batchSendCourse(data) {
  return request({
    url: '/user/fsUser/batchSendCourse',
    method: 'post',
    data: data
  })
}
