import { doGet, doPut } from 'wechat_common/utils/request'
import UrlConstants from 'root/constants/ecommerce/urlConstants'

export function getAdvertisePopup(siteId, code) {
  const url = UrlConstants.ECOMMERCE.GET_ADVERTISE_POPUP(siteId, code)
  return doGet({ url })
}

export function hideAdvertisePopup(siteId, code) {
  const url = UrlConstants.ECOMMERCE.UPDATE_ADVERTISE_POPUP(siteId)
  return doPut({
    url,
    data: { code },
  })
}
