优化及修复bug

This commit is contained in:
liyuhua
2023-08-14 19:03:26 +08:00
parent 26bf5b8ca3
commit a882a1a17f
17 changed files with 209 additions and 114 deletions

View File

@@ -122,7 +122,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
@property (nonatomic,assign) BOOL isReload;
///
@property(nonatomic,strong) PIFullScreenBannerAnimation *roomAnimation;
@property(nonatomic,strong) NSMutableArray *cacheList;
@end
@@ -286,7 +286,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
///
-(void)requestGiftList{
[self dealWithDefaultSvga];
///
// /
NSString *time = [NSDate getNowTimeTimestamp];
NSString *curTime = [NSDate timestampSwitchTime:[time integerValue] andFormatter:@"yyyy-MM-dd"];
NSDictionary *timeDic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kRequestGiftList"];
@@ -323,9 +323,14 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
-(void)dealWithDefaultSvga{
for (NSString *url in self.cacheList) {
NSArray *loveList = @[@"https://image.hfighting.com/candyTree_light.svga",@"https://image.hfighting.com/candyTree_open.svga",@"https://image.hfighting.com/candyTree_transform.svga"];
for (NSString *url in loveList) {
[self dealWithGiftListWithUrl:url fileName:url isSvga:YES];
}
NSArray *elfList = @[@"https://image.hfighting.com/treasure_fairy_trials_middle.mp4",@"https://image.hfighting.com/treasure_fairy_ten.mp4",@"https://image.hfighting.com/treasure_fairy_trials_high.mp4",@"https://image.hfighting.com/treasure_fairy_one.mp4"];
for (NSString *url in elfList) {
[self dealWithGiftListWithUrl:url fileName:url isSvga:NO];
}
}
-(void)dealWithGiftListWithUrl:(NSString *)url fileName:(NSString *)fileName isSvga:(BOOL)isSvga {
NSString *baseFileName = isSvga ? @"/GiftSvga":@"/GiftMp4";
@@ -1006,10 +1011,5 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
return _roomAnimation;
}
- (NSMutableArray *)cacheList{
if(!_cacheList){
_cacheList = [[NSMutableArray alloc]initWithArray:@[@"https://image.hfighting.com/candyTree_light.svga",@"https://image.hfighting.com/candyTree_open.svga",@"https://image.hfighting.com/candyTree_transform.svga"]];
}
return _cacheList;
}
@end