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

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

const addLike = (likeId, likeType) => {
  return http.request({
    url: bizConst.basicPrefix + '/like_info/save',
    method: 'POST',
    header: {
      'Tenant-Id': tenantId
    },
    data: {
      likeId,
      likeType
    },
  })
}

const cancelLike = (likeId, likeType) => {
  return http.request({
    url: bizConst.basicPrefix + '/like_info/remove',
    method: 'POST',
    header: {
      'Tenant-Id': tenantId
    },
    params: {
      likeId,
      likeType
    },
  })
}
export default {
  getLikeList,
  addLike,
  cancelLike
}