import request from '@/utils/request'

// 查询用户信息采集列表
export function listCollection(query) {
  return request({
    url: '/store/store/collection/list',
    method: 'get',
    params: query
  })
}

// 查询用户信息采集详细
export function getCollection(id) {
  return request({
    url: '/store/store/collection/' + id,
    method: 'get'
  })
}

// 查询用户信息采集详细
export function getInfo(query) {
  return request({
    url: '/store/store/collection/getInfo',
    method: 'get',
    params: query
  })
}

// 新增用户信息采集
export function addCollection(data) {
  return request({
    url: '/store/store/collection',
    method: 'post',
    data: data
  })
}

// 修改用户信息采集
export function updateCollection(data) {
  return request({
    url: '/store/store/collection',
    method: 'put',
    data: data
  })
}

// 删除用户信息采集
export function delCollection(id) {
  return request({
    url: '/store/store/collection/' + id,
    method: 'delete'
  })
}

// 导出用户信息采集
export function exportCollection(query) {
  return request({
    url: '/store/store/collection/export',
    method: 'get',
    params: query
  })
}


export function getWxaCodeCollectionUnLimit(collectionId) {
  return request({
    url: '/store/store/collection/getWxaCodeCollectionUnLimit/'+collectionId,
    method: 'get',
  })
}