feat(membership): 重构会员系统架构并优化VIP卡片显示

- 创建独立的会员服务模块 services/membership.ts,统一管理会员计划元数据和工具函数
- 新增 membershipSlice Redux状态管理,集中处理会员数据和状态
- 重构个人中心VIP会员卡片,支持动态显示会员计划和有效期
- 优化会员购买弹窗,使用统一的会员计划配置
- 改进会员数据获取流程,确保状态同步和一致性
This commit is contained in:
richarjiang
2025-10-29 16:08:58 +08:00
parent fcf1be211f
commit 7cd290d341
7 changed files with 569 additions and 114 deletions

View File

@@ -78,6 +78,8 @@ export type UserProfile = {
isVip?: boolean;
freeUsageCount?: number;
maxUsageCount?: number;
membershipExpiration?: string | null;
vipPlanName?: string;
chestCircumference?: number; // 胸围
waistCircumference?: number; // 腰围
upperHipCircumference?: number; // 上臀围
@@ -431,4 +433,4 @@ export const selectUserAge = createSelector(
}
);
export default userSlice.reducer;
export default userSlice.reducer;