import request from '@/utils/request'

export function list(query) {
  return request({
    url: '/store/user/list',
    method: 'get',
    params: query
  })
}
export function myList(query) {
  return request({
    url: '/store/user/myList',
    method: 'get',
    params: query
  })
}
export function getUser(userId) {
  return request({
    url: '/store/user/' + userId,
    method: 'get'
  })
}

// 列出当前公司的客户
export function listUser(data) {
  return request({
    url: '/user/fsUser/list',
    method: 'post',
    data: data
  })
}

// 转移客户
export function transferUser(data) {
  return request({
    url: '/user/fsUser/transfer',
    method: 'post',
    data: data
  })
}
export function getUserList(query) {
  return request({
    url: '/store/user/getUserList',
    method: 'get',
    params: query
  })
}

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

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