import request from './api';

// 获取机构和个人参与人数
export const getCnt = () => {
	return request({
		url: `campaign/preBook/cnt`,
    method: 'get',
	})
}

// 查看当前token的机构状态
export const checkHospitalStatus = (token) => {
	return request({
    url: `api-ws/doctors/hospital/status`,
    method: 'get',
    headers: {
      token: token
    }
  })
}

// 设置开赛提醒接口 post
export const remind = (params) => {
  return request({
    url: `campaign/preBook/book`,
    method: 'post',
    data: {"activityId":1},	// 为了日后的扩展，暂时固定传 1
    headers: {
      token: params.token
    }
  })
}

// 预约状态 get
export const getRemindStatus = async (token) => {
	return request({
    url: `campaign/preBook/status`,
    method: 'get',
    headers: {
      token: token
    }
  })
}

export const checkToken = async(token) => {
  return request({
    url: `campaign/admin/task/checkToken?token=${token}`,
    method: 'get',
    headers: {
      token: token
    }
  })
}