chore: 更新 .gitignore 文件,移除不必要的包文件类型;新增邮箱验证码登录流程和 OAuth/Ticket 认证系统 API 文档;更新勋章相关逻辑,优化用户信息获取失败处理;调整勋章展示逻辑,支持多等级高亮功能。

This commit is contained in:
edwinQQQ
2025-07-14 17:37:10 +08:00
parent 99db078b62
commit 16f9041ba9
33 changed files with 15384 additions and 60390 deletions

View File

@@ -37,7 +37,7 @@ typedef enum : NSInteger {
@property (nonatomic, strong) UIButton *emptyUserMedalButton;
@property (nonatomic, strong) TYCyclePagerView *medalsCyclePagerView;
@property (nonatomic, strong) UIView *emptyView;
@property (nonatomic, copy) UICollectionView *medalsCollectionView;
@property (nonatomic, strong) UICollectionView *medalsCollectionView;
@property (nonatomic, strong) UIStackView *centerTabsStackView;
@property (nonatomic, strong) NSMutableArray <MedalSeriesItemVo *>*datasourceTaskMedals;
@@ -53,9 +53,9 @@ typedef enum : NSInteger {
@property (nonatomic, assign) MedalsCenterDisplayType displayType;
@property (nonatomic, strong) UserMedalsModel *userMedalsModel;
@property (nonatomic, copy) NSMutableArray <MedalSeriesVo *>*taskSquareMedalVo;
@property (nonatomic, copy) NSMutableArray <MedalSeriesVo *>*activitySquareMedalVo;
@property (nonatomic, copy) NSMutableArray <MedalSeriesVo *>*glorySquareMedalVo;
@property (nonatomic, strong) NSMutableArray <MedalSeriesVo *>*taskSquareMedalVo;
@property (nonatomic, strong) NSMutableArray <MedalSeriesVo *>*activitySquareMedalVo;
@property (nonatomic, strong) NSMutableArray <MedalSeriesVo *>*glorySquareMedalVo;
@property (nonatomic, strong) UIImageView *otherBG;
@property (nonatomic, strong) NetImageView *otherAvatar;
@@ -807,21 +807,25 @@ typedef enum : NSInteger {
- (void)_updateDataSource:(NSArray <MedalSeriesVo *>*)models {
if (models.count < [self.presenter pageSize]) {
NSArray *targetArr = models;
NSMutableArray *itemDataSources = [NSMutableArray array];
MedalSeriesVo *series = [models xpSafeObjectAtIndex:0];
if (series) {
targetArr = series.medalSeries;
}
itemDataSources = targetArr.mutableCopy;
if (targetArr.count < [self.presenter pageSize]) {
[self.medalsCollectionView.mj_footer endRefreshingWithNoMoreData];
} else {
[self.medalsCollectionView.mj_footer resetNoMoreData];
}
NSMutableArray *itemDataSources = [NSMutableArray array];
for (MedalSeriesVo *vo in models) {
[itemDataSources addObjectsFromArray:vo.medalSeries];
}
switch (self.currentTabType) {
case MedalsCenterTab_TaskMedals:
if (self.currentPageTaskMedals == 1) {
self.emptyView.hidden = (models.count != 0);
self.emptyView.hidden = (targetArr.count != 0);
self.datasourceTaskMedals = itemDataSources;
} else {
[self.datasourceTaskMedals addObjectsFromArray:itemDataSources];
@@ -829,7 +833,7 @@ typedef enum : NSInteger {
break;
case MedalsCenterTab_ActivityMedals:
if (self.currentPageActivityMedals == 1) {
self.emptyView.hidden = (models.count != 0);
self.emptyView.hidden = (targetArr.count != 0);
self.datasourceActivityMedals = itemDataSources;
} else {
[self.datasourceActivityMedals addObjectsFromArray:itemDataSources];
@@ -837,7 +841,7 @@ typedef enum : NSInteger {
break;
case MedalsCenterTab_GloryMedals:
if (self.currentPageGloryMedals == 1) {
self.emptyView.hidden = (models.count != 0);
self.emptyView.hidden = (targetArr.count != 0);
self.datasourceGloryMedals = itemDataSources;
} else {
[self.datasourceGloryMedals addObjectsFromArray:itemDataSources];
@@ -938,7 +942,9 @@ typedef enum : NSInteger {
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
MedalsCollectionViewCell *cell = [MedalsCollectionViewCell cellFor:collectionView atIndexPath:indexPath];
[cell updateCell:[self loadModel:indexPath.item] isForSquare:self.displayType == MedalsCenterDisplayType_Square];
[cell updateCell:[self loadModel:indexPath.item]
isForSquare:self.displayType == MedalsCenterDisplayType_Square
isForMine:self.displayType == MedalsCenterDisplayType_Mine];
return cell;
}
@@ -964,7 +970,8 @@ typedef enum : NSInteger {
return;
}
MedalsDetailView *view = [[MedalsDetailView alloc] initWithFrame:self.view.bounds];
view.detailItemVo = [self loadModel:indexPath.item];
[view updateSeriesItem:[self loadModel:indexPath.item]
isMine:self.displayType == MedalsCenterDisplayType_Mine || self.displayType == MedalsCenterDisplayType_Other];
[self.view addSubview:view];
}