import request from '@/utils/request'

// 查询会员标签组列表
export function listTagGroup(query) {
  return request({
    url: '/vip/tagGroup/list',
    method: 'get',
    params: query
  })
}

export function listTag(query) {
  return request({
    url: '/vip/tag/list',
    method: 'get',
    params: query
  })
}

// 查询会员标签组列表
export function listTagGroupForUserBindTag(query) {
  return request({
    url: '/vip/tagGroup/listForUserBindTag',
    method: 'get',
    params: query
  })
}

// 查询会员标签组详细
export function getTagGroup(id) {
  return request({
    url: '/vip/tagGroup/getById/' + id,
    method: 'get'
  })
}

// 批量查询会员标签组详细
export function getTagByIds(ids) {
  return request({
    url: '/vip/tagGroup/getTagByIds/' + ids,
    method: 'get'
  })
}

// 新增会员标签组
export function addTagGroup(data) {
  return request({
    url: '/vip/tagGroup/add',
    method: 'post',
    data: data
  })
}

// 修改会员标签组
export function updateTagGroup(data) {
  return request({
    url: '/vip/tagGroup/edit',
    method: 'post',
    data: data
  })
}

export function searchTags(query) {
  return request({
    url: '/vip/tagGroup/listForUserBindTag',
    method: 'get',
    params: query
  })
}