import { get, post } from './request' import { ApiResponse } from './common' /** * 签到数据接口 */ export interface CheckinData { hasCheckedInToday: boolean points: number lastCheckinDate: string | null pointsHistory: Array<{ date: string; points: number; expiryDate: string }> } /** * 签到响应接口 */ export interface CheckinResponse { success: boolean points: number message: string } /** * 获取用户签到状态和积分信息 * @returns Promise */ export const getCheckinStatus = async (): Promise => { const response = await get>('/api/user/checkin/status') return response.data } /** * 执行签到操作 * @returns Promise */ export const performCheckin = async (): Promise => { const response = await post>('/api/user/checkin', {}) return response.data }