feat(challenges): 移除进度徽章与副标题并动态计算剩余天数
- 使用 dayjs 实时计算挑战结束剩余天数,替代接口返回的固定值 - 删除 badge、subtitle 字段及相关渲染逻辑,简化 UI - 注释掉未使用的打卡操作区块,保持界面整洁
This commit is contained in:
@@ -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 & {
|
||||
|
||||
Reference in New Issue
Block a user