feat(challenges): 移除进度徽章与副标题并动态计算剩余天数

- 使用 dayjs 实时计算挑战结束剩余天数,替代接口返回的固定值
- 删除 badge、subtitle 字段及相关渲染逻辑,简化 UI
- 注释掉未使用的打卡操作区块,保持界面整洁
This commit is contained in:
richarjiang
2025-09-29 10:25:22 +08:00
parent b80af23f4f
commit 31c4e4fafa
2 changed files with 9 additions and 20 deletions

View File

@@ -5,9 +5,7 @@ export type ChallengeStatus = 'upcoming' | 'ongoing' | 'expired';
export type ChallengeProgressDto = {
completed: number;
target: number;
remaining: number;
badge: string;
subtitle?: string;
remaining: number
};
export type RankingItemDto = {
@@ -35,6 +33,7 @@ export type ChallengeListItemDto = {
isJoined: boolean;
startAt?: string;
endAt?: string;
minimumCheckInDays: number; // 最小打卡天数
};
export type ChallengeDetailDto = ChallengeListItemDto & {