// import request from '@/api/request'
import http from '@/api/http'

export default {
  // 活动- 活动报名
  async applyActivity(data) {
    return http({
      url: '/activity/applyActivity',
      method: 'POST',
      data
    })
  },

  // 活动- 收藏活动
  async collectionActivity(data) {
    return http({
      url: '/activity/collectionActivity',
      method: 'POST',
      data
    })
  },

  // 活动- 获取活动详情
  async queryActivityById(data) {
    return http({
      url: '/activity/queryActivityById',
      method: 'GET',
      data,
      noToken: true
    })
  },

  // 活动- 获取我收藏的活动列表
  async queryActivityCollectionList(data) {
    return http({
      url: '/activity/queryActivityCollectionList',
      method: 'POST',
      data
    })
  },

  // 活动- 获取活动列表
  async queryActivityList(data) {
    return http({
      url: '/activity/queryActivityList',
      method: 'GET',
      data,
      noToken: true,
      debounce: 200,
      // showLoading: true
    })
  },

  // 我的报名- 获取我报名的活动列表
  async queryApplyList(data) {
    return http({
      url: '/activity/queryApplyList',
      method: 'POST',
      data,
      // showLoading: true
    })
  },

  // 我的报名- 活动签到
  async signActivity(data) {
    return http({
      url: '/activity/signActivity',
      method: 'POST',
      data,
      // showToast: false
    })
  },
}