import request from '@/utils/request'

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/back/user/list',
    method: 'get',
    params: query
  })
}

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

// 修改用户状态
export function updateUserStatus(id, status) {
  return request({
    url: '/back/user/status',
    method: 'post',
    data: {
      id: id,
      status: status
    }
  })
}

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

// 获取用户标签
export function getUserTags(userId) {
  return request({
    url: '/back/user/tags/' + userId,
    method: 'get'
  })
}

// 获取当前登录用户的标签
export function getMyTags() {
  return request({
    url: '/back/user/myTags',
    method: 'get'
  })
}
