import http from '@/http/api.js'
import {
  bizConst
} from './biz/biz.js'
import {
  clientId,
  tenantId
} from '@/common/setting'

const getCollectionList = (current, size, vo) => {
  return http.request({
    url: bizConst.basicPrefix + '/collect_info/list',
    method: 'GET',
    header: {
      'Tenant-Id': tenantId
    },
    params: {
      current,
      size,
      ...vo
    },
  })
}

const addCollection = (collectId, collectType) => {
  return http.request({
    url: bizConst.basicPrefix + '/collect_info/save',
    method: 'POST',
    header: {
      'Tenant-Id': tenantId
    },
    data: {
      collectId,
      collectType
    },
  })
}

const cancelCollection = (collectId, collectType) => {
  return http.request({
    url: bizConst.basicPrefix + '/collect_info/remove',
    method: 'POST',
    header: {
      'Tenant-Id': tenantId
    },
    params: {
      collectId,
      collectType
    },
  })
}
export default {
  getCollectionList,
  addCollection,
  cancelCollection
}