import service from '@/utils/request/index'
// 在线时长的功能

/**
 * 获取当前用户在线时长
 */
export const getTodayOnlineSeconds = () => {
  return service.request<number>({
    url: '/api/personalCenter/getTodayOnlineSeconds',
    method: 'POST',
    // data: {},
  })
}

/**
 * 暂时这种轮询方案 30s调一次
 */
export const heartbeat = () => {
  return service.request<boolean>({
    url: '/api/personalCenter/heartbeat',
    method: 'POST',
    data: {},
  })
}
